Bug 1378970 - Part 1: Label CollectorRunner::mScheduleTimer using SystemGroup. r=billm
authorNathan Froyd <froydnj@gmail.com>
Thu, 06 Jul 2017 13:25:00 +0800
changeset 418642 7d8a372d113f3985735a1c3f35ec791b43f12264
parent 418641 0dce1ed65c8b02c047ed024c2be7092ef67c436f
child 418643 bed655e34ed939af69706116bbdb1d97b1f87c77
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1378970
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1378970 - Part 1: Label CollectorRunner::mScheduleTimer using SystemGroup. r=billm All other associated timers in this file use the SystemGroup for a GarbageCollection task, and this one should too. MozReview-Commit-ID: GjdAGxbZS03
dom/base/nsJSEnvironment.cpp
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -347,16 +347,17 @@ public:
         NS_IdleDispatchToCurrentThread(runnable.forget(), mDelay);
         SetTimer(mDelay, mTarget);
       } else {
         if (!mScheduleTimer) {
           mScheduleTimer = do_CreateInstance(NS_TIMER_CONTRACTID);
           if (!mScheduleTimer) {
             return;
           }
+          mScheduleTimer->SetTarget(SystemGroup::EventTargetFor(TaskCategory::GarbageCollection));
         } else {
           mScheduleTimer->Cancel();
         }
 
         // We weren't allowed to do idle dispatch immediately, do it after a
         // short timeout.
         mScheduleTimer->InitWithNamedFuncCallback(ScheduleTimedOut, this, 16,
                                                   nsITimer::TYPE_ONE_SHOT_LOW_PRIORITY,