зеркало из https://github.com/mozilla/gecko-dev.git
Bug 641175 - Protect timer in browser_tabview_bug599626.js from being eaten by GC [r=ian, a=test]
This commit is contained in:
Родитель
0570662051
Коммит
a49a392507
|
@ -2,6 +2,7 @@
|
|||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
let handleDialog;
|
||||
let timer; // keep in outer scope so it's not GC'd before firing
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
@ -124,7 +125,7 @@ function startCallbackTimer() {
|
|||
const dialogDelay = 10;
|
||||
|
||||
// Use a timer to invoke a callback to twiddle the authentication dialog
|
||||
let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||
timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||
timer.init(observer, dialogDelay, Ci.nsITimer.TYPE_ONE_SHOT);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче