ladybird/Libraries/LibWeb/Fetch
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
..
Fetching LibWeb: Ignore stale link fetch body callbacks 2026-05-13 20:54:10 +02:00
Infrastructure LibWeb: Stop blocking main fetch on pending preload results 2026-05-06 08:33:12 +02:00
Body.cpp LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
Body.h LibWeb: Add missing GC visits for XHR::FormDataEntry 2025-12-26 19:48:46 +01:00
Body.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
BodyInit.cpp LibWeb: Store HTTP methods and headers as ByteString 2025-11-26 09:15:06 -05:00
BodyInit.h LibWeb+IDLGenerators: Support nullable union types 2026-03-25 13:18:15 +00:00
BodyInit.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
Enums.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
Enums.h LibHTTP+LibWeb: Move Infrastructure::Request::CacheMode to LibHTTP 2026-01-22 07:05:06 -05:00
FetchMethod.cpp LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
FetchMethod.h LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
Headers.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
Headers.h LibHTTP+LibWeb+RequestServer: Move Fetch's HTTP header infra to LibHTTP 2025-11-27 14:57:29 +01:00
Headers.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
HeadersIterator.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
HeadersIterator.h LibWeb: Give IDL exposed PlatformObjects an InterfaceName 2026-02-14 20:22:40 +01:00
Request.cpp LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
Request.h LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
Request.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
Response.cpp LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
Response.h LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
Response.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00