mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03: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
Notes:
sideshowbarker
2024-07-17 07:43:05 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/2b3bc2654f Pull-request: https://github.com/SerenityOS/serenity/pull/23181
@ -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…
Reference in New Issue
Block a user