mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 17:37:33 +02:00
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.