ladybird/Libraries/LibWeb/Streams
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
..
AbstractOperations.cpp LibWeb: Sort remaining stream AOs (mostly) in spec order 2025-04-18 06:55:40 -04:00
AbstractOperations.h LibWeb: Sort remaining stream AOs (mostly) in spec order 2025-04-18 06:55:40 -04:00
Algorithms.h LibWeb/Streams: Put algorithm definitions in a separate header file 2024-12-11 15:11:21 +01:00
ByteLengthQueuingStrategy.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
ByteLengthQueuingStrategy.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ByteLengthQueuingStrategy.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
CountQueuingStrategy.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
CountQueuingStrategy.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CountQueuingStrategy.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
GenericTransformStream.cpp LibWeb: Add the IDL for the GenericTransformStream mixin 2024-11-17 22:37:45 +01:00
GenericTransformStream.h LibWeb: Add the IDL for the GenericTransformStream mixin 2024-11-17 22:37:45 +01:00
GenericTransformStream.idl LibWeb: Add the IDL for the GenericTransformStream mixin 2024-11-17 22:37:45 +01:00
QueuingStrategy.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
QueuingStrategy.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
QueuingStrategyInit.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
QueuingStrategyInit.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ReadableByteStreamController.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
ReadableByteStreamController.h LibWeb: Move ReadableStream AOs into their own file 2025-04-18 06:55:40 -04:00
ReadableByteStreamController.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ReadableStream.cpp LibWeb: Use the correct target realm to tee a stream 2025-04-30 09:30:15 -04:00
ReadableStream.h LibWeb: Use the correct target realm to tee a stream 2025-04-30 09:30:15 -04:00
ReadableStream.idl LibWeb: Implement ReadableStream's async iterator 2025-04-14 17:43:11 -04:00
ReadableStreamAsyncIterator.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
ReadableStreamAsyncIterator.h LibWeb: Implement ReadableStream's async iterator 2025-04-14 17:43:11 -04:00
ReadableStreamBYOBReader.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
ReadableStreamBYOBReader.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ReadableStreamBYOBReader.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ReadableStreamBYOBRequest.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
ReadableStreamBYOBRequest.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ReadableStreamBYOBRequest.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ReadableStreamDefaultController.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
ReadableStreamDefaultController.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ReadableStreamDefaultController.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ReadableStreamDefaultReader.cpp LibWeb: Remove unused VM from ReadLoopReadRequest 2025-04-30 09:30:15 -04:00
ReadableStreamDefaultReader.h LibWeb: Remove unused VM from ReadLoopReadRequest 2025-04-30 09:30:15 -04:00
ReadableStreamDefaultReader.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ReadableStreamGenericReader.cpp LibWeb: Move ReadableStream AOs into their own file 2025-04-18 06:55:40 -04:00
ReadableStreamGenericReader.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ReadableStreamGenericReader.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ReadableStreamOperations.cpp LibWeb: Move WritableStream AOs into their own file 2025-04-18 06:55:40 -04:00
ReadableStreamOperations.h LibWeb: Move ReadableStream AOs into their own file 2025-04-18 06:55:40 -04:00
ReadableStreamPipeTo.cpp LibWeb: Move WritableStream AOs into their own file 2025-04-18 06:55:40 -04:00
ReadableStreamPipeTo.h LibWeb: Move ReadableStream AOs into their own file 2025-04-18 06:55:40 -04:00
ReadableStreamTee.cpp LibWeb: Move ReadableStream AOs into their own file 2025-04-18 06:55:40 -04:00
ReadableStreamTee.h LibWeb: Move ReadableStream AOs into their own file 2025-04-18 06:55:40 -04:00
Transformer.cpp LibWeb: Move ReadableStream AOs into their own file 2025-04-18 06:55:40 -04:00
Transformer.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
TransformStream.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
TransformStream.h LibWeb: Add an 'enqueue' helper method on TransformStream 2024-12-25 12:00:54 +01:00
TransformStream.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
TransformStreamDefaultController.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
TransformStreamDefaultController.h LibWeb: Move ReadableStream AOs into their own file 2025-04-18 06:55:40 -04:00
TransformStreamDefaultController.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
TransformStreamOperations.cpp LibWeb: Move TransformStream AOs into their own file 2025-04-18 06:55:40 -04:00
TransformStreamOperations.h LibWeb: Move TransformStream AOs into their own file 2025-04-18 06:55:40 -04:00
UnderlyingSink.cpp LibWeb: Move ReadableStream AOs into their own file 2025-04-18 06:55:40 -04:00
UnderlyingSink.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
UnderlyingSource.cpp LibWeb: Move ReadableStream AOs into their own file 2025-04-18 06:55:40 -04:00
UnderlyingSource.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
WritableStream.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
WritableStream.h LibWeb: Return GC::Ref for some Stream promise returning functions 2024-11-16 18:33:58 +01:00
WritableStream.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
WritableStreamDefaultController.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
WritableStreamDefaultController.h LibWeb: Store WritableStream's strategy high water mark as a double 2025-04-11 12:10:46 -04:00
WritableStreamDefaultController.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
WritableStreamDefaultWriter.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
WritableStreamDefaultWriter.h LibWeb: Return GC::Ref for some Stream promise returning functions 2024-11-16 18:33:58 +01:00
WritableStreamDefaultWriter.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
WritableStreamOperations.cpp LibWeb: Move WritableStream AOs into their own file 2025-04-18 06:55:40 -04:00
WritableStreamOperations.h LibWeb: Move WritableStream AOs into their own file 2025-04-18 06:55:40 -04:00