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

This commit is contained in:
Andrew McCreight 2014-03-11 07:34:35 -07:00
Родитель 3afe49ddd2
Коммит c54675a8a9
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -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,