Files
ladybird/Libraries/LibWeb/Fetch/Infrastructure
Jonathan Gamble 6686cecf72 LibWeb: Stop blocking main fetch on pending preload results
The lichess.org lobby stylesheet sometimes gets render-blocked,
resulting in a blank page.

The main fetch would queue work and then spin_until wait for a pending
preload result on the main thread. This re-entered the event loop and
stranded the queued PendingResponse callback behind a pile of nested
event processing. So the preload response existed, but the stylesheet
never made it through the normal handoff path.

I chose to follow the PreloadEntry.cpp model to address this and track
at most one pending preload PendingResponse for each FetchParams,
resolving it directly from the preload callback when the response
arrives. This removes the spin_until, keeps the handoff asynchronous,
and lets the blocked stylesheet finish loading normally.

If the current single-consumer preload path ever changes, this logic
must be widened to handle it.
2026-05-06 08:33:12 +02:00
..
2025-08-23 16:04:36 -06:00
2025-08-23 16:04:36 -06:00