LibWeb: Restore check to prevent closing a traversable twice

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

https://github.com/whatwg/html/commit/3a8303ece44ed509928be626a6a65639fd
This commit is contained in:
Timothy Flynn
2024-10-09 06:36:15 -04:00
committed by Tim Flynn
parent be13a0ec3f
commit d80d951991
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();
}));
}
}