http/tests/xmlhttprequest/event-listener-gc.html is flaky
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Feb 2015 23:02:40 +0000 (23:02 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Feb 2015 23:02:40 +0000 (23:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=33342

Reviewed by Zalan Bujtas.

This failure means that the GC timer fires after readystatechange event. As a
speculative fix, start the timer before starting the load, so that it's certain to
finish earlier.

* http/tests/xmlhttprequest/event-listener-gc.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179572 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/http/tests/xmlhttprequest/event-listener-gc.html

index 7bb0555..417ee39 100644 (file)
@@ -1,3 +1,16 @@
+2015-02-03  Alexey Proskuryakov  <ap@apple.com>
+
+        http/tests/xmlhttprequest/event-listener-gc.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=33342
+
+        Reviewed by Zalan Bujtas.
+
+        This failure means that the GC timer fires after readystatechange event. As a
+        speculative fix, start the timer before starting the load, so that it's certain to
+        finish earlier.
+
+        * http/tests/xmlhttprequest/event-listener-gc.html:
+
 2015-02-03  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Mark some debug assertion failures to be skipped.
index 603f894..016632e 100644 (file)
@@ -30,13 +30,15 @@ function test()
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
     }
-        
+
+    // Timeout ensures stack references to request are cleared when we collect.
+    // Start the timer before starting the load, so that it's guaranteed to fire first.
+    setTimeout('collect();', 0);
+
     var request = new XMLHttpRequest();
     request.onreadystatechange = processStateChange;
     request.open("GET", "print-content-type.cgi", true);
     request.send(null);
-    
-    setTimeout('collect();', 0); // timeout ensures stack references to request are cleared when we collect
 }
 </script>
 </head>