| <html> |
| <script> |
| function runTest() { |
| if (window.layoutTestController) |
| layoutTestController.dumpAsText(); |
| |
| var s = document.createElement('script'); |
| s.setAttribute('onload', 'alert("Script onload handler called!")') |
| 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> |