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

Side by Side 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: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors 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 unified diff | Download patch
OLDNEW
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;
6 description("MessagePorts (and their execution contexts) should be collected by GC once close() has been called on them"); 5 description("MessagePorts (and their execution contexts) should be collected by GC once close() has been called on them");
6
7 window.jsTestIsAsync = true;
7 window.onmessage = function(evt) { 8 window.onmessage = function(evt) {
8 iframeDocGC = internals.observeGC(document.querySelector('iframe').contentDo cument); 9 iframeDocGC = internals.observeGC(document.querySelector('iframe').contentDo cument);
9 document.querySelector('iframe').remove(); 10 document.querySelector('iframe').remove();
10 gc(); 11 // The iframe is reachable via evt.source, and evt is on the
11 shouldBeTrue("iframeDocGC.wasCollected"); 12 // stack. asyncGC() will invoke the callback once back at
12 finishJSTest(); 13 // the event loop (and after having forced a GC); evt
14 // will consequently no longer be in scope and the iframe
15 // will have been GCed.
16 asyncGC(function () {
17 shouldBeTrue("iframeDocGC.wasCollected");
18 finishJSTest();
19 });
13 } 20 }
14 </script> 21 </script>
15 <iframe src="resources/message-port-gc-closed-iframe.html"></iframe> 22 <iframe src="resources/message-port-gc-closed-iframe.html"></iframe>
16 </body> 23 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698