blob: caca15ee5af9b0bb7c42d74700821fbcfd3b29d6 [file] [log] [blame]
<html>
<script>
function runTest() {
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var s = document.createElement('script');
s.setAttribute('onload', 'alert("Script onload handler called!"); if (window.testRunner) testRunner.notifyDone()');
s.id = "theScript";
s.src = "resources/script-element-gc.js";
document.body.appendChild(s);
}
</script>
<body onload="runTest()">
This tests that removing the script element from the script loaded by the element itself, and then garbage collecting does not cause a crash when dispatching the onload element (because the script element was freed).
<p>SUCCESS! Didn't Crash!</p>
</body>
</html>