mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1930253 - CleanupPhase should clear the graph first and only after that free snow whites, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D228491
This commit is contained in:
parent
24010340a8
commit
4a67fb0ef5
@ -3507,6 +3507,9 @@ void nsCycleCollector::CleanupAfterCollection() {
|
||||
mGraph.Clear();
|
||||
timeLog.Checkpoint("CleanupAfterCollection::mGraph.Clear()");
|
||||
|
||||
FreeSnowWhite(true);
|
||||
timeLog.Checkpoint("Collect::FreeSnowWhite");
|
||||
|
||||
TimeStamp endTime = TimeStamp::Now();
|
||||
uint32_t interval = (uint32_t)((endTime - mCollectionStart).ToMilliseconds());
|
||||
#ifdef COLLECT_TIME_DEBUG
|
||||
@ -3602,7 +3605,11 @@ bool nsCycleCollector::Collect(CCReason aReason, ccIsManual aIsManual,
|
||||
|
||||
// If the CC started idle, it will call BeginCollection, which
|
||||
// will do FreeSnowWhite, so it doesn't need to be done here.
|
||||
if (!startedIdle) {
|
||||
//
|
||||
// If we're in CleanupPhase, we want to clear the graph before
|
||||
// FreeSnowWhite runs, so that we don't need to remove objects from the graph
|
||||
// one by one. CleanupAfterCollection will call FreeSnowWhite.
|
||||
if (!startedIdle && mIncrementalPhase != CleanupPhase) {
|
||||
TimeLog timeLog;
|
||||
FreeSnowWhite(true);
|
||||
timeLog.Checkpoint("Collect::FreeSnowWhite");
|
||||
|
Loading…
Reference in New Issue
Block a user