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
..
HTTP LibWeb+RequestServer: Send cached bytecode with responses 2026-05-06 08:20:06 +02:00
ConnectionTimingInfo.h LibWeb/Fetch: Update timing info with the timings received from RS 2025-03-06 09:00:53 -07:00
FetchAlgorithms.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
FetchAlgorithms.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
FetchController.cpp LibWeb: Stop blocking main fetch on pending preload results 2026-05-06 08:33:12 +02:00
FetchController.h LibWeb: Stop blocking main fetch on pending preload results 2026-05-06 08:33:12 +02:00
FetchParams.cpp LibWeb: Copy fetchParams http_network_or_cache_fetch according to spec 2026-01-29 05:22:27 -06:00
FetchParams.h LibWeb: Copy fetchParams http_network_or_cache_fetch according to spec 2026-01-29 05:22:27 -06:00
FetchRecord.cpp LibWeb: Make ESO "fetch group" weakly reference the fetch records 2025-07-29 20:00:17 -04:00
FetchRecord.h LibGC: Only call finalize() on types that override finalize() 2026-01-07 20:51:17 +01:00
FetchTimingInfo.cpp LibWeb: Use enum instead of bool for CanUseCrossOriginIsolatedAPIs 2026-02-13 16:47:42 +00:00
FetchTimingInfo.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
HTTP.cpp LibWeb: Make User-Agent updates apply to HTTP requests on reload 2025-12-28 09:11:13 -05:00
HTTP.h LibWeb: Make User-Agent updates apply to HTTP requests on reload 2025-12-28 09:11:13 -05:00
IncrementalReadLoopReadRequest.cpp LibWeb: Make more use of Value::{as,as_if,is} in LibWeb 2026-02-28 10:24:37 -05:00
IncrementalReadLoopReadRequest.h LibWeb: Add "parallel queue" and allow it as fetch task destination 2025-07-17 00:13:39 +02:00
MimeTypeBlocking.cpp LibWeb: Extract some CORS and MIME Fetch helpers to their own files 2025-11-27 14:57:29 +01:00
MimeTypeBlocking.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
NetworkPartitionKey.cpp LibWeb: Make Environment's top level origin nullable 2025-05-27 14:48:43 +12:00
NetworkPartitionKey.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
NoSniffBlocking.cpp LibHTTP+LibWeb+RequestServer: Move Fetch's HTTP header infra to LibHTTP 2025-11-27 14:57:29 +01:00
NoSniffBlocking.h LibHTTP+LibWeb+RequestServer: Move Fetch's HTTP header infra to LibHTTP 2025-11-27 14:57:29 +01:00
PortBlocking.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
PortBlocking.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
RequestOrResponseBlocking.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Task.cpp LibWeb: Add "parallel queue" and allow it as fetch task destination 2025-07-17 00:13:39 +02:00
Task.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
URL.cpp LibTextCodec+LibWeb: Move isomorphic coders to LibTextCodec 2025-11-27 14:57:29 +01:00
URL.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00