From e450ba4d4f9a7f1ccc359b101e46e0855e790a4a Mon Sep 17 00:00:00 2001 From: Paul Bone Date: Thu, 5 Aug 2021 09:13:31 +0000 Subject: [PATCH] Bug 1722143 - pt 6. Run the first slice of Full and User-idle GCs in idle time r=smaug Differential Revision: https://phabricator.services.mozilla.com/D120785 --- dom/base/CCGCScheduler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/base/CCGCScheduler.cpp b/dom/base/CCGCScheduler.cpp index 27ed6ebd5684..f5730363c5b4 100644 --- a/dom/base/CCGCScheduler.cpp +++ b/dom/base/CCGCScheduler.cpp @@ -193,7 +193,7 @@ void CCGCScheduler::PokeShrinkingGC() { CCGCScheduler* s = static_cast(aClosure); s->KillShrinkingGCTimer(); s->SetWantMajorGC(JS::GCReason::USER_INACTIVE); - s->GCRunnerFired(TimeStamp::Now() + s->mActiveIntersliceGCBudget); + s->EnsureGCRunner(0); }, this, StaticPrefs::javascript_options_compact_on_user_inactive_delay(), nsITimer::TYPE_ONE_SHOT_LOW_PRIORITY, "ShrinkingGCTimerFired"); @@ -208,7 +208,7 @@ void CCGCScheduler::PokeFullGC() { s->KillFullGCTimer(); s->SetNeedsFullGC(); s->SetWantMajorGC(JS::GCReason::FULL_GC_TIMER); - s->GCRunnerFired(TimeStamp::Now() + s->mActiveIntersliceGCBudget); + s->EnsureGCRunner(0); }, this, StaticPrefs::javascript_options_gc_delay_full(), nsITimer::TYPE_ONE_SHOT_LOW_PRIORITY, "FullGCTimerFired"); -- 2.11.4.GIT