LibWeb: Do not destroy document until whole subtree completed unloading

Fixes crashing when "unload" event handler tries to access active
document that has already been destroyed.
This commit is contained in:
Aliaksandr Kalenik 2024-04-19 15:38:17 +02:00 committed by Alexander Kalenik
commit d3cfe35fbd
Notes: sideshowbarker 2024-07-16 22:18:54 +09:00
6 changed files with 70 additions and 26 deletions

View file

@ -0,0 +1,7 @@
<script src="../include.js"></script>
<iframe id="iframe" src="../../data/iframe-unload-event.html"></iframe>
<script>
test(() => {
println("Test passes if it is possible to navigate away without crashing.");
});
</script>