зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1427525, try to not leak IdleTaskRunners related to GC/CC during shutdow, r=mccr8
This commit is contained in:
Родитель
0d1852004e
Коммит
496d14fe4e
|
@ -1636,6 +1636,10 @@ nsJSContext::BeginCycleCollectionCallback()
|
|||
|
||||
MOZ_ASSERT(!sICCRunner, "Tried to create a new ICC timer when one already existed.");
|
||||
|
||||
if (sShuttingDown) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Create an ICC timer even if ICC is globally disabled, because we could be manually triggering
|
||||
// an incremental collection, and we want to be sure to finish it.
|
||||
sICCRunner = IdleTaskRunner::Create(ICCRunnerFired,
|
||||
|
@ -1863,6 +1867,11 @@ void
|
|||
GCTimerFired(nsITimer *aTimer, void *aClosure)
|
||||
{
|
||||
nsJSContext::KillGCTimer();
|
||||
nsJSContext::KillInterSliceGCRunner();
|
||||
if (sShuttingDown) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Now start the actual GC after initial timer has fired.
|
||||
sInterSliceGCRunner = IdleTaskRunner::Create([aClosure](TimeStamp aDeadline) {
|
||||
return InterSliceGCRunnerFired(aDeadline, aClosure);
|
||||
|
|
Загрузка…
Ссылка в новой задаче