зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1373408 - Make nsUpdateTimerManager notify callbacks on idle. r=rhelmer
MozReview-Commit-ID: INSvHMEXOxt --HG-- extra : rebase_source : f91bc401f283b593d0c4bdf012923450676d7cbc
This commit is contained in:
Родитель
eafdeadedf
Коммит
c045933e61
|
@ -219,13 +219,15 @@ TimerManager.prototype = {
|
|||
}
|
||||
tryFire(function() {
|
||||
if (timerData.callback && timerData.callback.notify) {
|
||||
try {
|
||||
timerData.callback.notify(timer);
|
||||
LOG("TimerManager:notify - notified timerID: " + timerID);
|
||||
} catch (e) {
|
||||
LOG("TimerManager:notify - error notifying timerID: " + timerID +
|
||||
", error: " + e);
|
||||
}
|
||||
ChromeUtils.idleDispatch(() => {
|
||||
try {
|
||||
timerData.callback.notify(timer);
|
||||
LOG("TimerManager:notify - notified timerID: " + timerID);
|
||||
} catch (e) {
|
||||
LOG("TimerManager:notify - error notifying timerID: " + timerID +
|
||||
", error: " + e);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
LOG("TimerManager:notify - timerID: " + timerID + " doesn't " +
|
||||
"implement nsITimerCallback - skipping");
|
||||
|
|
Загрузка…
Ссылка в новой задаче