Bug 739899 - Fix orange
authorBill McCloskey <wmccloskey@mozilla.com>
Thu, 05 Apr 2012 16:50:40 -0700
changeset 91141 2f84376063fe9b6fd302c7eabd0ff2daafc7e371
parent 91140 a57ee6d20b76bfbfbde2686b14aa49457a11f2f0
child 91142 153cbd729eba7b3660f0a1d782c3d78c5e236abf
push id667
push usertim.taubert@gmx.de
push dateTue, 10 Apr 2012 10:56:50 +0000
treeherderfx-team@6fe5b0271cd1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs739899
milestone14.0a1
Bug 739899 - Fix orange
js/src/jsgc.cpp
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -4330,21 +4330,23 @@ EndVerifyBarriers(JSContext *cx)
     AutoCopyFreeListToArenas copy(rt);
     RecordNativeStackTopForGC(rt);
 
     VerifyTracer *trc = (VerifyTracer *)rt->gcVerifyData;
 
     if (!trc)
         return;
 
+    bool compartmentCreated = false;
+
     /* We need to disable barriers before tracing, which may invoke barriers. */
     for (CompartmentsIter c(rt); !c.done(); c.next()) {
-        /* Don't verify if a new compartment was created. */
         if (!c->needsBarrier_)
-            return;
+            compartmentCreated = true;
+
         c->needsBarrier_ = false;
     }
 
     /*
      * We need to bump gcNumber so that the methodjit knows that jitcode has
      * been discarded.
      */
     JS_ASSERT(trc->number == rt->gcNumber);
@@ -4355,17 +4357,17 @@ EndVerifyBarriers(JSContext *cx)
 
     rt->gcVerifyData = NULL;
     rt->gcIncrementalState = NO_INCREMENTAL;
 
     JS_TracerInit(trc, rt, MarkFromAutorooter);
 
     AutoGCRooter::traceAll(trc);
 
-    if (IsIncrementalGCSafe(rt)) {
+    if (!compartmentCreated && IsIncrementalGCSafe(rt)) {
         /*
          * Verify that all the current roots were reachable previously, or else
          * are marked.
          */
         JS_TracerInit(trc, rt, CheckReachable);
         MarkRuntime(trc, true);
 
         JS_TracerInit(trc, rt, CheckEdge);