ladybird/Libraries/LibWeb/Fetch/Fetching
Andreas Kling 8c59b6281d LibWeb: Ignore stale link fetch body callbacks
When a link element starts a replacement fetch, the old response body
can already have queued its consume-body task. stop_fetch() clears the
fetch algorithms for future work, so that late task re-read an empty
callback and tripped AK::Function's wrapper assertion.

Keep fetch_response_handover() tied to the algorithms object it
selected when creating the consume-body steps. Then make
HTMLLinkElement apply the HTML stale-resource check explicitly with a
fetch generation, so results from superseded link fetches return before
processing the resource.

Add a text test that replaces a stylesheet data URL and waits for the
replacement stylesheet's load event. This covers stale body callbacks
and verifies that superseded stylesheet results do not apply.
2026-05-13 20:54:10 +02:00
..
Checks.cpp LibWeb: Store HTTP methods and headers as ByteString 2025-11-26 09:15:06 -05:00
Checks.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
FetchedDataReceiver.cpp LibWeb: Push fetch body chunks directly into the byte stream controller 2026-04-30 14:18:11 +02:00
FetchedDataReceiver.h LibWeb: Push fetch body chunks directly into the byte stream controller 2026-04-30 14:18:11 +02:00
Fetching.cpp LibWeb: Ignore stale link fetch body callbacks 2026-05-13 20:54:10 +02:00
Fetching.h LibHTTP+LibWeb: Move the IncludeCredentials enum to LibHTTP 2026-02-10 12:21:20 +01:00
PendingResponse.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
PendingResponse.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
RefCountedFlag.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
RefCountedFlag.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00