mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1005396 - Finish a long ICC early after graph building has finished. r=smaug
This commit is contained in:
parent
58bf1a974b
commit
8948c072d8
@ -3529,7 +3529,7 @@ nsCycleCollector::Collect(ccType aCCType,
|
|||||||
|
|
||||||
++mResults.mNumSlices;
|
++mResults.mNumSlices;
|
||||||
|
|
||||||
bool finished = false;
|
bool continueSlice = true;
|
||||||
do {
|
do {
|
||||||
switch (mIncrementalPhase) {
|
switch (mIncrementalPhase) {
|
||||||
case IdlePhase:
|
case IdlePhase:
|
||||||
@ -3539,6 +3539,14 @@ nsCycleCollector::Collect(ccType aCCType,
|
|||||||
case GraphBuildingPhase:
|
case GraphBuildingPhase:
|
||||||
PrintPhase("MarkRoots");
|
PrintPhase("MarkRoots");
|
||||||
MarkRoots(aBudget);
|
MarkRoots(aBudget);
|
||||||
|
|
||||||
|
// Only continue this slice if we're running synchronously or the
|
||||||
|
// next phase will probably be short, to reduce the max pause for this
|
||||||
|
// collection.
|
||||||
|
// (There's no need to check if we've finished graph building, because
|
||||||
|
// if we haven't, we've already exceeded our budget, and will finish
|
||||||
|
// this slice anyways.)
|
||||||
|
continueSlice = aBudget.isUnlimited() || mResults.mNumSlices < 3;
|
||||||
break;
|
break;
|
||||||
case ScanAndCollectWhitePhase:
|
case ScanAndCollectWhitePhase:
|
||||||
// We do ScanRoots and CollectWhite in a single slice to ensure
|
// We do ScanRoots and CollectWhite in a single slice to ensure
|
||||||
@ -3553,10 +3561,13 @@ nsCycleCollector::Collect(ccType aCCType,
|
|||||||
case CleanupPhase:
|
case CleanupPhase:
|
||||||
PrintPhase("CleanupAfterCollection");
|
PrintPhase("CleanupAfterCollection");
|
||||||
CleanupAfterCollection();
|
CleanupAfterCollection();
|
||||||
finished = true;
|
continueSlice = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} while (!aBudget.checkOverBudget() && !finished);
|
if (continueSlice) {
|
||||||
|
continueSlice = !aBudget.checkOverBudget();
|
||||||
|
}
|
||||||
|
} while (continueSlice);
|
||||||
|
|
||||||
// Clear mActivelyCollecting here to ensure that a recursive call to
|
// Clear mActivelyCollecting here to ensure that a recursive call to
|
||||||
// Collect() does something.
|
// Collect() does something.
|
||||||
|
Loading…
Reference in New Issue
Block a user