mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-27 19:59:03 +00:00
LibWeb: Add missing navigable destroyed check
This commit is contained in:
parent
2393ee6548
commit
baf589deef
Notes:
sideshowbarker
2024-07-17 18:46:57 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: baf589deef
Pull-request: https://github.com/SerenityOS/serenity/pull/23720
1 changed files with 5 additions and 0 deletions
|
@ -683,6 +683,11 @@ TraversableNavigable::HistoryStepResult TraversableNavigable::apply_the_history_
|
||||||
|
|
||||||
// 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:
|
// 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:
|
||||||
for (auto& navigable : non_changing_navigables_that_still_need_updates) {
|
for (auto& navigable : non_changing_navigables_that_still_need_updates) {
|
||||||
|
if (navigable->has_been_destroyed()) {
|
||||||
|
++completed_non_changing_jobs;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
queue_global_task(Task::Source::NavigationAndTraversal, *navigable->active_window(), [&] {
|
queue_global_task(Task::Source::NavigationAndTraversal, *navigable->active_window(), [&] {
|
||||||
// NOTE: This check is not in the spec but we should not continue navigation if navigable has been destroyed.
|
// NOTE: This check is not in the spec but we should not continue navigation if navigable has been destroyed.
|
||||||
if (navigable->has_been_destroyed()) {
|
if (navigable->has_been_destroyed()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue