Chromium Code Reviews| 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> |