2 <p>Test that destroying a document doesn't cause a crash when executing MessageChannel constructor saved from its Window object.</p>
7 if (window.GCController)
8 return GCController.collect();
10 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
11 var s = new String("abc");
17 document.getElementById("log").innerHTML += message + "<br>";
20 if (window.testRunner) {
21 testRunner.dumpAsText();
22 testRunner.waitUntilDone();
29 constructor = window.frames[0].MessageChannel;
31 var frameElement = document.getElementsByTagName("iframe")[0];
32 frameElement.parentNode.removeChild(frameElement);
36 setTimeout(test2, 10);
47 log("Didn't crash: SUCCESS");
49 if (window.testRunner)
50 testRunner.notifyDone();
54 <iframe src="resources/message-port-iframe.html" onload="test()"></iframe>