From 93b6334966a17fe8622615f3dd701206b7d02e14 Mon Sep 17 00:00:00 2001 From: Timur Sultanov Date: Wed, 24 Jul 2024 22:30:30 +0400 Subject: [PATCH] LibWeb: Schedule Microtasks on Microtask queue --- Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp b/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp index e95dd29dc88..c974232665f 100644 --- a/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp +++ b/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp @@ -400,7 +400,7 @@ int queue_a_task(HTML::Task::Source source, JS::GCPtr event_loop, JS: auto task = HTML::Task::create(event_loop->vm(), source, document, steps); // 8. Let queue be the task queue to which source is associated on event loop. - auto& queue = event_loop->task_queue(); + auto& queue = source == HTML::Task::Source::Microtask ? event_loop->microtask_queue() : event_loop->task_queue(); // 9. Append task to queue. queue.add(task);