blob: 3ec81155de84f69e97d9a9f8af9ac2c51fbfbaa3 [file] [log] [blame]
<body>
<p>Test that delivering a message to a port that was never referenced from JS doesn't cause a crash.</p>
<pre id=log></pre>
<script>
function gc()
{
if (window.GCController)
return GCController.collect();
for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
var s = new String("abc");
}
}
function log(message)
{
document.getElementById("log").innerHTML += message + "<br>";
}
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var channel = new MessageChannel;
channel.port1.postMessage("msg");
channel.port1.start();
channel = 0;
gc();
setTimeout("log('PASS'); if (window.testRunner) testRunner.notifyDone()", 100);
</script>
</body>