Bug 981033 - Clear mActivelyCollecting before restarting CC. r=smaug

This commit is contained in:
Andrew McCreight 2014-03-11 07:34:35 -07:00
parent 60b29c62b7
commit d1cecbd6d3

View File

@ -3198,7 +3198,6 @@ nsCycleCollector::Collect(ccType aCCType,
if (mActivelyCollecting || mFreeingSnowWhite) {
return false;
}
AutoRestore<bool> ar(mActivelyCollecting);
mActivelyCollecting = true;
bool startedIdle = (mIncrementalPhase == IdlePhase);
@ -3239,6 +3238,10 @@ nsCycleCollector::Collect(ccType aCCType,
}
} while (!aBudget.checkOverBudget() && !finished);
// Clear mActivelyCollecting here to ensure that a recursive call to
// Collect() does something.
mActivelyCollecting = false;
if (aCCType != SliceCC && !startedIdle) {
// We were in the middle of an incremental CC (using its own listener).
// Somebody has forced a CC, so after having finished out the current CC,