Bug 902922 - OOM assertions in the cycle collector should be fatal in debug builds - r=mccr8
☠☠ backed out by 2d5462474ba2 ☠ ☠
authorBenoit Jacob <bjacob@mozilla.com>
Sun, 27 Oct 2013 07:51:31 -0400
changeset 166219 338760b1955c4f7795a9909ba8c902f24fd184b1
parent 166201 508288a2b62cc6e6332ec008a3448dc2fff769c2
child 166220 2d5462474ba29f5108bcc77d94c9e902d2f1317d
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs902922
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 902922 - OOM assertions in the cycle collector should be fatal in debug builds - r=mccr8
xpcom/base/nsCycleCollector.cpp
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -2127,17 +2127,17 @@ nsCycleCollector::MarkRoots(GCGraphBuild
             aBuilder.SetLastChild();
         }
     }
     if (mGraph.mRootCount > 0) {
         aBuilder.SetLastChild();
     }
 
     if (aBuilder.RanOutOfMemory()) {
-        NS_ASSERTION(false,
+        MOZ_ASSERT(false,
                      "Ran out of memory while building cycle collector graph");
         CC_TELEMETRY(_OOM, true);
     }
 }
 
 
 ////////////////////////////////////////////////////////////////////////
 // Bacon & Rajan's |ScanRoots| routine.
@@ -2245,34 +2245,34 @@ nsCycleCollector::ScanWeakMaps()
             if (mColor == black && kColor == black && vColor != black) {
                 GraphWalker<ScanBlackVisitor>(ScanBlackVisitor(mWhiteNodeCount, failed)).Walk(wm->mVal);
                 anyChanged = true;
             }
         }
     } while (anyChanged);
 
     if (failed) {
-        NS_ASSERTION(false, "Ran out of memory in ScanWeakMaps");
+        MOZ_ASSERT(false, "Ran out of memory in ScanWeakMaps");
         CC_TELEMETRY(_OOM, true);
     }
 }
 
 void
 nsCycleCollector::ScanRoots(nsICycleCollectorListener *aListener)
 {
     mWhiteNodeCount = 0;
 
     // On the assumption that most nodes will be black, it's
     // probably faster to use a GraphWalker than a
     // NodePool::Enumerator.
     bool failed = false;
     GraphWalker<scanVisitor>(scanVisitor(mWhiteNodeCount, failed)).WalkFromRoots(mGraph);
 
     if (failed) {
-        NS_ASSERTION(false, "Ran out of memory in ScanRoots");
+        MOZ_ASSERT(false, "Ran out of memory in ScanRoots");
         CC_TELEMETRY(_OOM, true);
     }
 
     ScanWeakMaps();
 
     if (aListener) {
         aListener->BeginResults();