1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 10:01:13 +09:00
ladybird/Libraries/LibWeb/Fetch
Timothy Flynn 0cd5e99066 LibWeb: Use the correct target realm to tee a stream
We currently store Web::Fetch::Infrastructure::Response objects in the
HTTP cache. They are associated with their original realm, but when we
use a cached response, we clone it into the target realm. For example,
two <iframe> objects loading the same HTML will be in different realms.

When we clone the response, we must use the target realm throughout the
entire cloning process. We neglected to do this for the cloned response
body stream, which is cloned via teeing. The result was the the stream
for the "cloned" response was created in the original realm, causing
issues down the line when reading from that stream tried to handle read
promises on behalf of the original realm. There are protections in place
to prevent this from happening, and the cached response read would never
complete.
2025-04-30 09:30:15 -04:00
..
Fetching LibWeb: Make a bunch of CSP classes not realm associated 2025-04-28 12:41:28 +02:00
Infrastructure LibWeb: Use the correct target realm to tee a stream 2025-04-30 09:30:15 -04:00
Body.cpp AK+LibURL+LibWeb: Use simdutf to validate ASCII strings 2025-04-06 11:05:58 -04:00
Body.h LibWeb/Fetch: Sync with spec update (whatwg/fetch#1569) 2025-01-30 16:24:50 -07:00
Body.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
BodyInit.cpp LibWeb: Move ReadableStream AOs into their own file 2025-04-18 06:55:40 -04:00
BodyInit.h LibWeb: Remove exception handling from safely extracting response bodies 2024-12-09 20:02:51 -07:00
BodyInit.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Enums.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Enums.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
FetchMethod.cpp LibWeb: Move ReadableStream AOs into their own file 2025-04-18 06:55:40 -04:00
FetchMethod.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Headers.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
Headers.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Headers.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
HeadersIterator.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
HeadersIterator.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Request.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
Request.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Request.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Response.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
Response.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Response.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00