mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 913130, part 3 - Run {PrepareFor,CleanupAfter} every iteration of ShutdownCollect. r=smaug
This commit is contained in:
parent
fe8bff9077
commit
76de7e39ff
@ -2663,12 +2663,12 @@ nsCycleCollector::ShutdownCollect(nsICycleCollectorListener *aListener)
|
||||
{
|
||||
nsAutoTArray<PtrInfo*, 4000> whiteNodes;
|
||||
|
||||
if (!PrepareForCollection(nullptr, &whiteNodes))
|
||||
return;
|
||||
|
||||
for (uint32_t i = 0; i < DEFAULT_SHUTDOWN_COLLECTIONS; ++i) {
|
||||
NS_ASSERTION(i < NORMAL_SHUTDOWN_COLLECTIONS, "Extra shutdown CC");
|
||||
|
||||
if (!PrepareForCollection(nullptr, &whiteNodes))
|
||||
return;
|
||||
|
||||
// Synchronous cycle collection. Always force a JS GC beforehand.
|
||||
FixGrayBits(true);
|
||||
|
||||
@ -2678,12 +2678,12 @@ nsCycleCollector::ShutdownCollect(nsICycleCollectorListener *aListener)
|
||||
aListener = nullptr;
|
||||
|
||||
BeginCollection(ShutdownCC, aListener);
|
||||
if (!FinishCollection(aListener)) {
|
||||
bool collectedAny = FinishCollection(aListener);
|
||||
CleanupAfterCollection();
|
||||
if (!collectedAny) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
CleanupAfterCollection();
|
||||
}
|
||||
|
||||
bool
|
||||
|
Loading…
Reference in New Issue
Block a user