Bug 928056 - Fix ordering of pause and state change when entering GC; r=billm
☠☠ backed out by 3b459fed3fc6 ☠ ☠
authorTerrence Cole <terrence@mozilla.com>
Fri, 18 Oct 2013 11:43:35 -0700
changeset 166149 d6180c846c364e87fba89072302fa6069757756c
parent 166148 f75226d2273f6851eb233888e18f0585e0788a9f
child 166150 3b459fed3fc63cad9ecce02a93e5697aad0a7739
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs928056
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 928056 - Fix ordering of pause and state change when entering GC; r=billm
js/src/jsgc.cpp
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -4071,19 +4071,20 @@ EndSweepPhase(JSRuntime *rt, JSGCInvocat
     FinishMarkingValidation(rt);
 
     rt->gcLastGCTime = PRMJ_Now();
 }
 
 namespace {
 
 /* ...while this class is to be used only for garbage collection. */
-class AutoGCSession : AutoTraceSession
+class AutoGCSession
 {
     AutoPauseWorkersForTracing pause;
+    AutoTraceSession session;
 
   public:
     explicit AutoGCSession(JSRuntime *rt);
     ~AutoGCSession();
 };
 
 } /* anonymous namespace */
 
@@ -4100,18 +4101,18 @@ AutoTraceSession::AutoTraceSession(JSRun
 
 AutoTraceSession::~AutoTraceSession()
 {
     JS_ASSERT(runtime->isHeapBusy());
     runtime->heapState = prevState;
 }
 
 AutoGCSession::AutoGCSession(JSRuntime *rt)
-  : AutoTraceSession(rt, MajorCollecting),
-    pause(rt)
+  : pause(rt),
+    session(rt, MajorCollecting)
 {
     runtime->gcIsNeeded = false;
     runtime->gcInterFrameGC = true;
 
     runtime->gcNumber++;
 
 #ifdef DEBUG
     // Threads with an exclusive context should never pause while they are in