Bug 1430752 - Fix GC zeal to not attempt to check gray marking state during incremental GC r=sfink
authorJon Coppeard <jcoppeard@mozilla.com>
Tue, 16 Jan 2018 06:41:00 +0200
changeset 453961 4e3657c2c2700459447b54fa588304b8bcb69664
parent 453960 1f3711534710096532095eb6438c362fad67a20a
child 453962 7048261aef79442eb77413b8acd400187bf96ae4
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1430752
milestone59.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 1430752 - Fix GC zeal to not attempt to check gray marking state during incremental GC r=sfink
js/src/jit-test/tests/gc/bug-1430752.js
js/src/jsgc.cpp
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/gc/bug-1430752.js
@@ -0,0 +1,2 @@
+gczeal(18);
+gcslice(3);
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -7491,17 +7491,17 @@ GCRuntime::collect(bool nonincrementalBy
     if (reason == JS::gcreason::COMPARTMENT_REVIVED)
         maybeDoCycleCollection();
 
 #ifdef JS_GC_ZEAL
     if (rt->hasZealMode(ZealMode::CheckHeapAfterGC)) {
         gcstats::AutoPhase ap(rt->gc.stats(), gcstats::PhaseKind::TRACE_HEAP);
         CheckHeapAfterGC(rt);
     }
-    if (rt->hasZealMode(ZealMode::CheckGrayMarking)) {
+    if (rt->hasZealMode(ZealMode::CheckGrayMarking) && !isIncrementalGCInProgress()) {
         MOZ_RELEASE_ASSERT(CheckGrayMarkingState(rt));
     }
 #endif
 }
 
 js::AutoEnqueuePendingParseTasksAfterGC::~AutoEnqueuePendingParseTasksAfterGC()
 {
     if (!OffThreadParsingMustWaitForGC(gc_.rt))