mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 977688 - Get rid of CC_AbortIfNull. r=smaug
This commit is contained in:
parent
8e1830277d
commit
59f6206562
@ -220,13 +220,6 @@ using namespace mozilla;
|
||||
// logs from MOZ_CC_LOG_ALL and MOZ_CC_LOG_SHUTDOWN, or other uses
|
||||
// of nsICycleCollectorListener)
|
||||
|
||||
MOZ_NEVER_INLINE void
|
||||
CC_AbortIfNull(void *ptr)
|
||||
{
|
||||
if (!ptr)
|
||||
MOZ_CRASH();
|
||||
}
|
||||
|
||||
// Various parameters of this collector can be tuned using environment
|
||||
// variables.
|
||||
|
||||
@ -1232,7 +1225,9 @@ private:
|
||||
|
||||
void CheckedPush(nsDeque &aQueue, PtrInfo *pi)
|
||||
{
|
||||
CC_AbortIfNull(pi);
|
||||
if (!pi) {
|
||||
MOZ_CRASH();
|
||||
}
|
||||
if (!aQueue.Push(pi, fallible_t())) {
|
||||
mVisitor.Failed();
|
||||
}
|
||||
@ -1318,7 +1313,6 @@ GraphWalker<Visitor>::DoWalk(nsDeque &aQueue)
|
||||
// built the graph, for hopefully-better locality.
|
||||
while (aQueue.GetSize() > 0) {
|
||||
PtrInfo *pi = static_cast<PtrInfo*>(aQueue.PopFront());
|
||||
CC_AbortIfNull(pi);
|
||||
|
||||
if (pi->mParticipant && mVisitor.ShouldVisitNode(pi)) {
|
||||
mVisitor.VisitNode(pi);
|
||||
@ -2536,7 +2530,10 @@ nsCycleCollector::MarkRoots(SliceBudget &aBudget)
|
||||
|
||||
while (!aBudget.isOverBudget() && !mCurrNode->IsDone()) {
|
||||
PtrInfo *pi = mCurrNode->GetNext();
|
||||
CC_AbortIfNull(pi);
|
||||
if (!pi) {
|
||||
MOZ_CRASH();
|
||||
}
|
||||
|
||||
// We need to call the builder's Traverse() method on deleted nodes, to
|
||||
// set their firstChild() that may be read by a prior non-deleted
|
||||
// neighbor.
|
||||
|
Loading…
Reference in New Issue
Block a user