| 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();
|
| shouldBeTrue("iframeDocGC.wasCollected");
|
| finishJSTest();
|
| }
|
| +window.onmessage = function(evt) {
|
| + // The iframe is reachable via evt.source, and evt is on the
|
| + // 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>
|
|
|