mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
When parse_off_thread() completes, the result callback runs inside a deferred_invoke, which executes outside the HTML event loop's task model. This meant that any microtasks queued by the callback (e.g. promise reactions from react_to_promise during module linking) were never drained, since HTML::EventLoop::process() only performs microtask checkpoints after executing an HTML task. Fix this by performing an explicit microtask checkpoint after the parse result callback. This ensures that promise reactions queued during module linking are drained immediately. This fixes module worker scripts timing out because their loading promise chains would stall indefinitely.