mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 07:39:16 +00:00
LibWeb: Early return navigation process if navigable has been destroyed
If a navigable has been destroyed during a navigation process, we should early return from it. The introduced checks are not in the spec because, as explained in https://github.com/whatwg/html/issues/9690 the spec is not written with such a level of detail.
This commit is contained in:
parent
c20123378d
commit
c437f16cc1
Notes:
sideshowbarker
2024-07-17 10:08:28 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: c437f16cc1
Pull-request: https://github.com/SerenityOS/serenity/pull/21093
4 changed files with 50 additions and 2 deletions
|
@ -334,6 +334,10 @@ void NavigableContainer::destroy_the_child_navigable()
|
|||
// 7. Let traversable be container's node navigable's traversable navigable.
|
||||
auto traversable = this->navigable()->traversable_navigable();
|
||||
|
||||
// Not in the spec
|
||||
navigable->set_has_been_destroyed();
|
||||
HTML::all_navigables().remove(navigable);
|
||||
|
||||
// 8. Append the following session history traversal steps to traversable:
|
||||
traversable->append_session_history_traversal_steps([traversable] {
|
||||
// 1. Apply pending history changes to traversable.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue