Title: [180105] trunk/LayoutTests
Revision
180105
Author
a...@apple.com
Date
2015-02-13 22:37:32 -0800 (Fri, 13 Feb 2015)

Log Message

http/tests/xmlhttprequest/event-listener-gc.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=33342

Reviewed by Darin Adler.

Instead of using a zero delay timer, which can be legitimately delayed for dozens
of milliseconds, perform the collection in a second load event handler. GC code
has changed so much that I cannot confirm that the test still verifies the fix,
however we collect after returning for the function and unwinding the stack, so it should.

Also, clear the JS variable for a good measure.

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

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (180104 => 180105)


--- trunk/LayoutTests/ChangeLog	2015-02-14 06:20:36 UTC (rev 180104)
+++ trunk/LayoutTests/ChangeLog	2015-02-14 06:37:32 UTC (rev 180105)
@@ -1,3 +1,19 @@
+2015-02-13  Alexey Proskuryakov  <a...@apple.com>
+
+        http/tests/xmlhttprequest/event-listener-gc.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=33342
+
+        Reviewed by Darin Adler.
+
+        Instead of using a zero delay timer, which can be legitimately delayed for dozens
+        of milliseconds, perform the collection in a second load event handler. GC code
+        has changed so much that I cannot confirm that the test still verifies the fix,
+        however we collect after returning for the function and unwinding the stack, so it should.
+
+        Also, clear the JS variable for a good measure.
+
+        * http/tests/xmlhttprequest/event-listener-gc.html:
+
 2015-02-13  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         Update fast/canvas/canvas-measureText-ideographicSpace.html after r177774

Modified: trunk/LayoutTests/http/tests/xmlhttprequest/event-listener-gc.html (180104 => 180105)


--- trunk/LayoutTests/http/tests/xmlhttprequest/event-listener-gc.html	2015-02-14 06:20:36 UTC (rev 180104)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/event-listener-gc.html	2015-02-14 06:37:32 UTC (rev 180105)
@@ -30,21 +30,19 @@
         testRunner.waitUntilDone();
     }
 
-    // Force layout now, as otherwise it will occur before our garbage collection timer,
-    // possibly delaying it until after XMLHttpRequest finishes.
-    document.body.offsetTop;
-
     var request = new XMLHttpRequest();
     request._onreadystatechange_ = processStateChange;
     request.open("GET", "resources/print-headers.cgi", true);
     request.send(null);
-
-    setTimeout('collect();', 0);
+    request = null;
 }
+
+window.addEventListener("load", test);
+window.addEventListener("load", collect);
 </script>
 </head>
 
-<body _onload_="test();">
+<body>
 <p>This test checks whether event handlers for outstanding XMLHttpRequests survive garbage collection.</p>
 <p>See https://bugs.webkit.org/show_bug.cgi?id=9113 REGRESSION (14581): 
 XMLHttpRequest never calls onreadystatechange with a readystate == 4</p>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to