set timeout for parent window to fire after child window. b=379484 r=bzbarsky
authorrhelmer@mozilla.com
Wed, 02 May 2007 22:47:56 -0700
changeset 1038 05a66eda8320154c6ba0846a1185d037c68ce7fd
parent 1037 44325da9e3dea999b6fed7de268d9f7eecb5f338
child 1039 229b8f9cbddb7d7361528c8cf53bd9ed92c4cbfe
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs379484
milestone1.9a5pre
set timeout for parent window to fire after child window. b=379484 r=bzbarsky
build/bloatcycle.html
--- a/build/bloatcycle.html
+++ b/build/bloatcycle.html
@@ -20,21 +20,22 @@ var idx = 0;
 var w;
 
 window.onload = function () {
     w = window.open("about:blank");
     window.setTimeout(loadURL, interval); 
 };
 function loadURL () {
     w.location.href = list[idx++];
-    if (list[idx]) {
+    if (idx < list.length) {
 	window.setTimeout(loadURL, interval);
     } else {
-    window.setTimeout("w.close();", interval);
-	window.setTimeout("window.close();", interval);
+	window.setTimeout("w.close();", interval);
+	window.setTimeout("window.close();", interval*2);
     }
 }
-    var i;
-    for(i=0;i<6;i++) {
-      document.write(list[i]);
-      document.write("<br>");
-    }
+var i;
+
+for(i=0; i < list.length;i++) {
+    document.write(list[i]);
+    document.write("<br>");
+}
 </script>