blob: fdb08f947c7c0c46e8dbb84e1712700a27df2c6a [file] [log] [blame]
<p>This page tests for a GC crash when tearing down a worker. If the tests passes,
you'll see a PASS message below.</p>
<pre id="console"></pre>
<script>
function $(id)
{
return document.getElementById(id);
}
function log(s)
{
$("console").appendChild(document.createTextNode(s + "\n"));
}
(function () {
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var worker = new Worker("resources/worker-gc2.js");
worker.onmessage = function () {
log("PASS: You didn't crash.");
// Try to wait for the worker to finish closing.
setTimeout(function () {
if (window.testRunner)
testRunner.notifyDone();
}, 0);
}
})();
</script>