1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 10:45:09 +00:00

LibWeb: Remove now-unnecessary JS::Handles in HTML task capture lists

JS::SafeFunction will protect anything captures for HTML tasks now.
This commit is contained in:
Andreas Kling 2022-09-24 12:12:42 +02:00
parent d505192014
commit 2ccb9bef49
6 changed files with 22 additions and 22 deletions

View file

@ -1105,7 +1105,7 @@ DOM::ExceptionOr<void> BrowsingContext::traverse_the_history(size_t entry_index,
if (new_document->ready_state() == "complete"sv) {
// then queue a global task on the DOM manipulation task source given newDocument's relevant global object to run the following steps:
queue_global_task(Task::Source::DOMManipulation, relevant_global_object(*new_document), [new_document = JS::make_handle(*new_document)]() mutable {
queue_global_task(Task::Source::DOMManipulation, relevant_global_object(*new_document), [new_document]() mutable {
// 1. If newDocument's page showing flag is true, then abort these steps.
if (new_document->page_showing())
return;
@ -1174,7 +1174,7 @@ DOM::ExceptionOr<void> BrowsingContext::traverse_the_history(size_t entry_index,
// 20. If hashChanged is true,
if (hash_changed) {
// then queue a global task on the DOM manipulation task source given newDocument's relevant global object
queue_global_task(Task::Source::DOMManipulation, relevant_global_object(*new_document), [new_document = JS::make_handle(*new_document)]() mutable {
queue_global_task(Task::Source::DOMManipulation, relevant_global_object(*new_document), [new_document]() mutable {
// to fire an event named hashchange at newDocument's relevant global object,
// using HashChangeEvent, with the oldURL attribute initialized to oldURL
// and the newURL attribute initialized to newURL.