зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
5f2bfd2d1a
Коммит
513460553b
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче