Bug 896154 - Don't check per thread data when verifying pre barriers until after worker threads have been paused, r=billm.
authorBrian Hackett <bhackett1024@gmail.com>
Fri, 26 Jul 2013 16:27:44 -0600
changeset 140230 2287b266756501af9cedfe42082b3525969be655
parent 140229 f570fc641c5f087fc00e87708ecda8053495c3ad
child 140231 a685f0150c6cce0aacd11ebedc52fdeb49a5601c
push id25020
push userryanvm@gmail.com
push dateSat, 27 Jul 2013 22:13:14 +0000
treeherdermozilla-central@75e2498668df [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs896154
milestone25.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 896154 - Don't check per thread data when verifying pre barriers until after worker threads have been paused, r=billm.
js/src/gc/Verifier.cpp
--- a/js/src/gc/Verifier.cpp
+++ b/js/src/gc/Verifier.cpp
@@ -439,27 +439,26 @@ NextNode(VerifyNode *node)
     else
         return (VerifyNode *)((char *)node + sizeof(VerifyNode) +
                              sizeof(EdgeValue)*(node->count - 1));
 }
 
 void
 gc::StartVerifyPreBarriers(JSRuntime *rt)
 {
-    if (rt->gcVerifyPreData ||
-        rt->gcIncrementalState != NO_INCREMENTAL ||
-        !IsIncrementalGCSafe(rt))
-    {
+    if (rt->gcVerifyPreData || rt->gcIncrementalState != NO_INCREMENTAL)
         return;
-    }
 
     MinorGC(rt, JS::gcreason::API);
 
     AutoPrepareForTracing prep(rt);
 
+    if (!IsIncrementalGCSafe(rt))
+        return;
+
     for (GCChunkSet::Range r(rt->gcChunkSet.all()); !r.empty(); r.popFront())
         r.front()->bitmap.clear();
 
     VerifyPreTracer *trc = js_new<VerifyPreTracer>();
 
     rt->gcNumber++;
     trc->number = rt->gcNumber;
     trc->count = 0;