From 7fb09bf95b716b6befb5df010fb3cd37f26c0a56 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Tue, 2 Apr 2024 17:16:01 +0200 Subject: [PATCH] LibWeb: Skip not runnable in spin_processing_tasks_with_source_until() Fixes https://github.com/SerenityOS/serenity/issues/23801 --- 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 6b43f205796..57f6ca830ab 100644 --- a/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp +++ b/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp @@ -107,7 +107,7 @@ void EventLoop::spin_processing_tasks_with_source_until(Task::Source source, JS: return true; if (m_task_queue.has_runnable_tasks()) { auto tasks = m_task_queue.take_tasks_matching([&](auto& task) { - return task.source() == source; + return task.source() == source && task.is_runnable(); }); for (auto& task : tasks.value()) {