mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 06:24:58 +00:00
LibWeb: Mark Navigable as destroyed in destroy_top_level_traversable AO
Without this, a top level traversable might show up in settings we don't want it to when accessing all_navigables, such as choose a navigable.
This commit is contained in:
parent
a0e7af0cd9
commit
2b3bc2654f
1 changed files with 5 additions and 0 deletions
|
@ -917,6 +917,11 @@ void TraversableNavigable::destroy_top_level_traversable()
|
|||
|
||||
// 5. Remove traversable from the user agent's top-level traversable set.
|
||||
user_agent_top_level_traversable_set().remove(this);
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
// 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