Bug 1342863 - (Part 8) DocGroup labeling for timer callback in nsRefreshDriver. r=dholbert

MozReview-Commit-ID: DP7WFkvlrPq

--HG--
extra : rebase_source : df4ed6ec82bfb780491339b92b31a4a91fbc145f
This commit is contained in:
KuoE0 2017-03-15 17:38:53 +08:00
Родитель 5f2bfd2d1a
Коммит 513460553b
1 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@ -1437,11 +1437,17 @@ nsRefreshDriver::SetHighPrecisionTimersEnabled(bool aEnable)
nsCOMPtr<nsITimer> timer = do_CreateInstance(NS_TIMER_CONTRACTID);
if (timer) {
if (nsPresContext* pc = GetPresContext()) {
timer->SetTarget(
pc->Document()->EventTargetFor(TaskCategory::Other));
}
timer.forget(&sDisableHighPrecisionTimersTimer);
sDisableHighPrecisionTimersTimer->InitWithFuncCallback(DisableHighPrecisionTimersCallback,
nullptr,
90 * 1000,
nsITimer::TYPE_ONE_SHOT);
sDisableHighPrecisionTimersTimer->
InitWithNamedFuncCallback(DisableHighPrecisionTimersCallback,
nullptr,
90 * 1000,
nsITimer::TYPE_ONE_SHOT,
"DisableHighPrecisionTimersCallback");
} else {
// might happen if we're shutting down XPCOM; just drop the time period down
// immediately