LibWeb: Revert blocking of task by source in EventLoop

This reverts commit 664611bae4.

It seems like the HTML spec has been misinterpreted and this text:
"... Note that in this setup, the processing model still enforces that
the user agent would never process events from any one task source out
of order."

does not mean we can't interrupt execution of task by a task with the
same task source. It just says they should be processed in the order
they were added.

Fixes hanging while navigating from PR list to PR page on GitHub.
This commit is contained in:
Aliaksandr Kalenik 2024-04-13 06:09:34 +02:00 committed by Andreas Kling
parent ccd16c847e
commit 9d69563da4
Notes: sideshowbarker 2024-07-17 03:00:02 +09:00
3 changed files with 1 additions and 46 deletions

View file

@ -39,10 +39,7 @@ JS::GCPtr<Task> TaskQueue::take_first_runnable()
return nullptr;
for (size_t i = 0; i < m_tasks.size(); ++i) {
auto const& task = m_tasks[i];
if (m_event_loop->is_task_source_blocked(task->source()))
continue;
if (task->is_runnable())
if (m_tasks[i]->is_runnable())
return m_tasks.take(i);
}
return nullptr;
@ -54,8 +51,6 @@ bool TaskQueue::has_runnable_tasks() const
return false;
for (auto& task : m_tasks) {
if (m_event_loop->is_task_source_blocked(task->source()))
continue;
if (task->is_runnable())
return true;
}