| <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> |