Files
ladybird/Libraries/LibWeb/HTML/NavigableContainer.cpp
Andreas Kling bd83591a1c LibWeb: Clear load event delayer when destroying child navigable
When a child navigable starts loading, the navigate algorithm calls
set_delaying_load_events(true), creating a DocumentLoadEventDelayer
on the parent document. This delayer is normally cleared when the
navigation finalizes via set_delaying_load_events(false).

However, when an iframe is removed from the DOM, the child navigable
is destroyed. If the finalize step hasn't run yet, the delayer
lingers until GC collects the Navigable, which can block the parent
document's load event indefinitely.

Fix this by explicitly clearing the "is delaying load events" flag
in destroy_the_child_navigable() right after marking the navigable
as destroyed.
2026-02-10 21:19:35 +01:00

17 KiB