Skip to content

Commit baf589d

Browse files
kalenikaliaksandrawesomekling
authored andcommitted
LibWeb: Add missing navigable destroyed check
1 parent 2393ee6 commit baf589d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Userland/Libraries/LibWeb/HTML/TraversableNavigable.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,11 @@ TraversableNavigable::HistoryStepResult TraversableNavigable::apply_the_history_
683683

684684
// 18. For each navigable of nonchangingNavigablesThatStillNeedUpdates, queue a global task on the navigation and traversal task source given navigable's active window to run the steps:
685685
for (auto& navigable : non_changing_navigables_that_still_need_updates) {
686+
if (navigable->has_been_destroyed()) {
687+
++completed_non_changing_jobs;
688+
continue;
689+
}
690+
686691
queue_global_task(Task::Source::NavigationAndTraversal, *navigable->active_window(), [&] {
687692
// NOTE: This check is not in the spec but we should not continue navigation if navigable has been destroyed.
688693
if (navigable->has_been_destroyed()) {

0 commit comments

Comments
 (0)