mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-12 13:21:57 +00:00
LibWeb: Use finalize for cleaning up all navigables
The use of this HashMap looks very spooky, but let's at least use finalize when cleaning them up on destruction to make things slightly less dangerous looking.
This commit is contained in:
parent
59162c8155
commit
76397c9ecd
Notes:
github-actions[bot]
2025-01-17 09:11:51 +00:00
Author: https://github.com/shannonbooth
Commit: 76397c9ecd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3284
7 changed files with 17 additions and 13 deletions
|
@ -1268,7 +1268,7 @@ void TraversableNavigable::destroy_top_level_traversable()
|
|||
// FIXME: Figure out why we need to do this... we shouldn't be leaking Navigables for all time.
|
||||
// However, without this, we can keep stale destroyed traversables around.
|
||||
set_has_been_destroyed();
|
||||
all_navigables().remove(this);
|
||||
all_navigables().remove(*this);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#finalize-a-same-document-navigation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue