Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Unified Diff: LayoutTests/fast/events/message-port-gc-closed.html

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Comments + fix fast/events/message-port-gc-closed.html Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/events/message-port-gc-closed.html
diff --git a/LayoutTests/fast/events/message-port-gc-closed.html b/LayoutTests/fast/events/message-port-gc-closed.html
index 4dba52da1a27ae633a9d72d6f1fc2a8b59fb1f41..3dedd8232bf3217d2e4febf486ce6285ec985444 100644
--- a/LayoutTests/fast/events/message-port-gc-closed.html
+++ b/LayoutTests/fast/events/message-port-gc-closed.html
@@ -4,13 +4,19 @@
<script>
jsTestIsAsync = true;
description("MessagePorts (and their execution contexts) should be collected by GC once close() has been called on them");
-window.onmessage = function(evt) {
+function finishTest() {
iframeDocGC = internals.observeGC(document.querySelector('iframe').contentDocument);
document.querySelector('iframe').remove();
gc();
Mads Ager (chromium) 2014/09/16 12:17:44 Now that we are touching this test we should make
shouldBeTrue("iframeDocGC.wasCollected");
finishJSTest();
}
+window.onmessage = function(evt) {
+ // The iframe is reachable via evt.source, and evt is on the
Mads Ager (chromium) 2014/09/16 12:17:44 asyncGC above should solve this issue reliably by
sof 2014/09/17 09:42:57 Thanks, much tidier that way; done.
+ // stack, so restart the test once that reference has gone out of
+ // scope.
+ setTimeout(finishTest, 0);
+}
</script>
<iframe src="resources/message-port-gc-closed-iframe.html"></iframe>
</body>

Powered by Google App Engine
This is Rietveld 408576698