Bug 956081 - Fix the CC's GC-has-been-run detection in the presence of GGC; r=mccr8
This commit is contained in:
@@ -877,15 +877,7 @@ CycleCollectedJSRuntime::ZoneParticipant()
|
||||
nsresult
|
||||
CycleCollectedJSRuntime::TraverseRoots(nsCycleCollectionNoteRootCallback &aCb)
|
||||
{
|
||||
static bool gcHasRun = false;
|
||||
if (!gcHasRun) {
|
||||
uint32_t gcNumber = JS_GetGCParameter(mJSRuntime, JSGC_NUMBER);
|
||||
if (!gcNumber) {
|
||||
// Cannot cycle collect if GC has not run first!
|
||||
MOZ_CRASH();
|
||||
}
|
||||
gcHasRun = true;
|
||||
}
|
||||
MOZ_ASSERT(!NeedCollect(), "Cannot cycle collect if GC has not run first!");
|
||||
|
||||
TraverseNativeRoots(aCb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user