Bug 1468112 - Use runnable name also for IdleTaskRunner's timer, r=farre

This commit is contained in:
Olli Pettay 2018-06-12 12:17:08 +03:00
parent 0300566d26
commit bad979936f
2 changed files with 4 additions and 2 deletions

View File

@ -42,6 +42,7 @@ IdleTaskRunner::IdleTaskRunner(const CallbackType& aCallback,
, mRepeating(aRepeating), mTimerActive(false)
, mMayStopProcessing(aMayStopProcessing)
, mTaskCategory(aTaskCategory)
, mName(aRunnableName)
{
}
@ -159,7 +160,7 @@ IdleTaskRunner::Schedule(bool aAllowIdleDispatch)
// short timeout.
mScheduleTimer->InitWithNamedFuncCallback(ScheduleTimedOut, this, 16,
nsITimer::TYPE_ONE_SHOT_LOW_PRIORITY,
"IdleTaskRunner");
mName);
}
}
}
@ -201,7 +202,7 @@ IdleTaskRunner::SetTimerInternal(uint32_t aDelay)
}
mTimer->InitWithNamedFuncCallback(TimedOut, this, aDelay,
nsITimer::TYPE_ONE_SHOT,
"IdleTaskRunner");
mName);
mTimerActive = true;
}
}

View File

@ -67,6 +67,7 @@ private:
bool mTimerActive;
MayStopProcessingCallbackType mMayStopProcessing;
TaskCategory mTaskCategory;
const char* mName;
};
} // end of namespace mozilla.