mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
When a document reaches ref_count==0, we will now remove all of the descendant nodes from the document, and also break all the explicit links (such as the currently hovered element.) Basically, DOM nodes will keep the document alive even after the document reaches ref_count==0. This allows JS wrappers to stay alive and keep the document alive as well. This matches the behavior of at least some other browsers. This patch also adds a bunch of sanity checking assertions around DOM teardown, to help catch mistakes in the future. Fixes #3771.
6.7 KiB
6.7 KiB