LibWeb: Restore check to prevent closing a traversable twice

We removed this check as a workaround for a spec issue that was resolved
in:

3a8303ece4
This commit is contained in:
Timothy Flynn 2024-10-09 06:36:15 -04:00 committed by Tim Flynn
parent be13a0ec3f
commit d80d951991
Notes: github-actions[bot] 2024-10-09 11:00:32 +00:00
3 changed files with 17 additions and 10 deletions

View file

@ -826,9 +826,9 @@ void Window::close()
// 1. Set thisTraversable's is closing to true.
traversable->set_closing(true);
// 2. Queue a task on the DOM manipulation task source to close thisTraversable.
// 2. Queue a task on the DOM manipulation task source to definitely close thisTraversable.
HTML::queue_global_task(HTML::Task::Source::DOMManipulation, incumbent_global_object, JS::create_heap_function(heap(), [traversable] {
verify_cast<TraversableNavigable>(*traversable).close_top_level_traversable();
verify_cast<TraversableNavigable>(*traversable).definitely_close_top_level_traversable();
}));
}
}