 Chromium Code Reviews
 Chromium Code Reviews Issue 517043003:
  Move Frame to the Oilpan heap.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 517043003:
  Move Frame to the Oilpan heap.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| OLD | NEW | 
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> | 
| 2 <body> | 2 <body> | 
| 3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> | 
| 4 <script> | 4 <script> | 
| 5 jsTestIsAsync = true; | 5 jsTestIsAsync = true; | 
| 6 description("MessagePorts (and their execution contexts) should be collected by GC once close() has been called on them"); | 6 description("MessagePorts (and their execution contexts) should be collected by GC once close() has been called on them"); | 
| 7 window.onmessage = function(evt) { | 7 function finishTest() { | 
| 8 iframeDocGC = internals.observeGC(document.querySelector('iframe').contentDo cument); | 8 iframeDocGC = internals.observeGC(document.querySelector('iframe').contentDo cument); | 
| 9 document.querySelector('iframe').remove(); | 9 document.querySelector('iframe').remove(); | 
| 10 gc(); | 10 gc(); | 
| 
Mads Ager (chromium)
2014/09/16 12:17:44
Now that we are touching this test we should make
 | |
| 11 shouldBeTrue("iframeDocGC.wasCollected"); | 11 shouldBeTrue("iframeDocGC.wasCollected"); | 
| 12 finishJSTest(); | 12 finishJSTest(); | 
| 13 } | 13 } | 
| 14 window.onmessage = function(evt) { | |
| 15 // 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.
 | |
| 16 // stack, so restart the test once that reference has gone out of | |
| 17 // scope. | |
| 18 setTimeout(finishTest, 0); | |
| 19 } | |
| 14 </script> | 20 </script> | 
| 15 <iframe src="resources/message-port-gc-closed-iframe.html"></iframe> | 21 <iframe src="resources/message-port-gc-closed-iframe.html"></iframe> | 
| 16 </body> | 22 </body> | 
| OLD | NEW |