diff --git a/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp b/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp index 50b2450b03..6d4c0f031a 100644 --- a/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp +++ b/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp @@ -238,13 +238,6 @@ void EventLoop::process() schedule(); } -// FIXME: This is here to paper over an issue in the HTML parser where it'll create new interpreters (and thus ESOs) on temporary documents created for innerHTML if it uses Document::realm() to get the global object. -// Use queue_global_task instead. -void old_queue_global_task_with_document(HTML::Task::Source source, DOM::Document& document, JS::SafeFunction steps) -{ - main_thread_event_loop().task_queue().add(HTML::Task::create(source, &document, move(steps))); -} - // https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-global-task void queue_global_task(HTML::Task::Source source, JS::Object& global_object, JS::SafeFunction steps) { diff --git a/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.h b/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.h index 63eb03224b..c186a52055 100644 --- a/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.h +++ b/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.h @@ -113,7 +113,6 @@ private: }; EventLoop& main_thread_event_loop(); -void old_queue_global_task_with_document(HTML::Task::Source, DOM::Document&, JS::SafeFunction steps); void queue_global_task(HTML::Task::Source, JS::Object&, JS::SafeFunction steps); void queue_a_microtask(DOM::Document const*, JS::SafeFunction steps); void perform_a_microtask_checkpoint(); diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp index 80dfb1d7bc..c60e55a907 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp @@ -276,7 +276,7 @@ void HTMLParser::the_end() } // 6. Queue a global task on the DOM manipulation task source given the Document's relevant global object to run the following substeps: - old_queue_global_task_with_document(HTML::Task::Source::DOMManipulation, *m_document, [document = m_document] { + queue_global_task(HTML::Task::Source::DOMManipulation, *m_document, [document = m_document] { // 1. Set the Document's load timing info's DOM content loaded event start time to the current high resolution time given the Document's relevant global object. document->load_timing_info().dom_content_loaded_event_start_time = HighResolutionTime::unsafe_shared_current_time(); @@ -305,7 +305,7 @@ void HTMLParser::the_end() }); // 9. Queue a global task on the DOM manipulation task source given the Document's relevant global object to run the following steps: - old_queue_global_task_with_document(HTML::Task::Source::DOMManipulation, *m_document, [document = m_document] { + queue_global_task(HTML::Task::Source::DOMManipulation, *m_document, [document = m_document] { // 1. Update the current document readiness to "complete". document->update_readiness(HTML::DocumentReadyState::Complete); diff --git a/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp b/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp index 668e2bb2ea..18ac9d3d5d 100644 --- a/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp +++ b/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp @@ -192,7 +192,7 @@ void XMLDocumentBuilder::document_end() (void)m_document->scripts_to_execute_when_parsing_has_finished().take_first(); } // Queue a global task on the DOM manipulation task source given the Document's relevant global object to run the following substeps: - old_queue_global_task_with_document(HTML::Task::Source::DOMManipulation, m_document, [document = m_document] { + queue_global_task(HTML::Task::Source::DOMManipulation, m_document, [document = m_document] { // Set the Document's load timing info's DOM content loaded event start time to the current high resolution time given the Document's relevant global object. document->load_timing_info().dom_content_loaded_event_start_time = HighResolutionTime::unsafe_shared_current_time(); @@ -220,7 +220,7 @@ void XMLDocumentBuilder::document_end() }); // Queue a global task on the DOM manipulation task source given the Document's relevant global object to run the following steps: - old_queue_global_task_with_document(HTML::Task::Source::DOMManipulation, m_document, [document = m_document] { + queue_global_task(HTML::Task::Source::DOMManipulation, m_document, [document = m_document] { // Update the current document readiness to "complete". document->update_readiness(HTML::DocumentReadyState::Complete);