LibWeb/XHR: Use HTML EventLoop to wait for response to arrive

This commit is contained in:
Shannon Booth 2025-01-03 12:37:49 +13:00 committed by Andreas Kling
parent 2fb4fcf4a0
commit ee1b2dced3
Notes: github-actions[bot] 2025-01-03 10:00:21 +00:00

View file

@ -942,7 +942,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::send(Optional<DocumentOrXMLHttpRequest
}
// FIXME: This is not exactly correct, as it allows the HTML event loop to continue executing tasks.
Platform::EventLoopPlugin::the().spin_until(GC::create_function(heap(), [&]() {
HTML::main_thread_event_loop().spin_until(GC::create_function(heap(), [&]() {
return processed_response || did_time_out;
}));