mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +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:
committed by
Andreas Kling
parent
c20123378d
commit
c437f16cc1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user