Bug 956081 - Fix the CC's GC-has-been-run detection in the presence of GGC; r=mccr8

--HG--
extra : rebase_source : de945b8e2f4972cb8b563f17a95c66cbba86a902
This commit is contained in:
Terrence Cole 2014-02-20 13:38:32 -08:00
parent e974347479
commit cedc05a6bc

View File

@ -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);