Bug 842841 - Be less agressive with clearing timeouts, r=mdas
authorJonathan Griffin <jgriffin@mozilla.com>
Wed, 20 Feb 2013 11:25:35 -0800
changeset 122480 42f61751c2f8319fa7def7be1df8745873345e25
parent 122479 8c18e64319054bcb0c5ad02353f3188538002313
child 122481 a2e41cb1e33e0664c81a2da21911f6f627ab8b42
push id24342
push userryanvm@gmail.com
push dateThu, 21 Feb 2013 13:05:06 +0000
treeherdermozilla-central@702d2814efbf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmdas
bugs842841
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 842841 - Be less agressive with clearing timeouts, r=mdas
testing/marionette/marionette-listener.js
--- a/testing/marionette/marionette-listener.js
+++ b/testing/marionette/marionette-listener.js
@@ -320,20 +320,17 @@ function createExecuteContentSandbox(aWi
 
   XPCOMUtils.defineLazyGetter(sandbox, 'SpecialPowers', function() {
     return new SpecialPowers(aWindow);
   });
 
   sandbox.asyncComplete = function sandbox_asyncComplete(value, status) {
     curWindow.removeEventListener("unload", onunload, false);
 
-    /* clear all timeouts potentially generated by the script*/
-    for (let i = 0; i <= asyncTestTimeoutId; i++) {
-      curWindow.clearTimeout(i);
-    }
+    curWindow.clearTimeout(asyncTestTimeoutId);
 
     sendSyncMessage("Marionette:shareData", {log: elementManager.wrapValue(marionetteLogObj.getLogs()),
                                              perf: elementManager.wrapValue(marionettePerf.getPerfData())});
     marionetteLogObj.clearLogs();
     marionettePerf.clearPerfData();
 
     if (status == 0){
       if (Object.keys(_emu_cbs).length) {