From a036edcd649f4c0a1fb9566d7935291c24901532 Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Thu, 21 Feb 2019 20:50:25 +0000 Subject: [PATCH] Bug 1529306 - Trigger GC timers before CC timers in nsJSContext::RunNextCollectorTimer. r=mccr8 This fixes frequent jsreftest OOMs on Win32 because we weren't triggering GC frequently enough. Bug 1377131 changed the timer ordering in this code and might have regressed this. Differential Revision: https://phabricator.services.mozilla.com/D20664 --HG-- extra : moz-landing-system : lando --- dom/base/nsJSEnvironment.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp index e521b23113ee..44e1aeb0fa80 100644 --- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -1904,16 +1904,16 @@ void nsJSContext::RunNextCollectorTimer(JS::GCReason aReason, // anything if a GC is in progress. MOZ_ASSERT(!sCCLockedOut, "Don't check the CC timers if the CC is locked out."); - } - if (sCCRunner) { - sCCRunner->SetDeadline(aDeadline); - runnable = sCCRunner; - } + if (sCCRunner) { + sCCRunner->SetDeadline(aDeadline); + runnable = sCCRunner; + } - if (sICCRunner) { - sICCRunner->SetDeadline(aDeadline); - runnable = sICCRunner; + if (sICCRunner) { + sICCRunner->SetDeadline(aDeadline); + runnable = sICCRunner; + } } if (runnable) {