mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-25 10:48:53 +00:00
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:
parent
9881d10e38
commit
d3cfe35fbd
Notes:
sideshowbarker
2024-07-16 22:18:54 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: d3cfe35fbd
Pull-request: https://github.com/SerenityOS/serenity/pull/24024
6 changed files with 70 additions and 26 deletions
10
Tests/LibWeb/Text/data/iframe-unload-event.html
Normal file
10
Tests/LibWeb/Text/data/iframe-unload-event.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<iframe
|
||||
name="test"
|
||||
srcdoc="<script>window.addEventListener('unload', () => { window['test']; })</script>"
|
||||
></iframe>
|
||||
<script>
|
||||
window.addEventListener("unload", () => {
|
||||
window["test"];
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue