ladybird/Libraries/LibWeb/Streams
Andreas Kling 25b817db71 LibWeb: Avoid temporary stream chunks for fetch bytes
Teach readable byte stream enqueueing about native byte producers by
sharing the post-transfer part of the spec algorithm. This lets fetch
hand owned network bytes directly to the byte stream controller instead
of first wrapping them in an unobservable Uint8Array and then
transferring its buffer back into another ArrayBuffer.

Keep the public enqueue(chunk) path spec-shaped and make the native
path rejoin after the TransferArrayBuffer step, so observable chunks are
still created by the shared reader and queue handling code.

This reduces GC churn while playing YouTube videos.
2026-05-15 15:20:33 +02:00
..
AbstractOperations.cpp LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
AbstractOperations.h LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
Algorithms.h LibWeb/Streams: Put algorithm definitions in a separate header file 2024-12-11 15:11:21 +01:00
ByteLengthQueuingStrategy.cpp LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
ByteLengthQueuingStrategy.h LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
ByteLengthQueuingStrategy.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
CountQueuingStrategy.cpp LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
CountQueuingStrategy.h LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
CountQueuingStrategy.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02: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+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
QueuingStrategy.h LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
QueuingStrategy.idl
QueuingStrategyInit.idl
ReadableByteStreamController.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
ReadableByteStreamController.h Everywhere: Run clang-format 2026-02-18 08:02:45 -05:00
ReadableByteStreamController.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
ReadableStream.cpp LibWeb/Streams: Convert UnderlyingSource to IDL bindings conversion 2026-05-09 10:49:49 +02:00
ReadableStream.h LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
ReadableStream.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
ReadableStreamAsyncIterator.cpp LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
ReadableStreamAsyncIterator.h LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
ReadableStreamBYOBReader.cpp LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
ReadableStreamBYOBReader.h LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
ReadableStreamBYOBReader.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
ReadableStreamBYOBRequest.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
ReadableStreamBYOBRequest.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ReadableStreamBYOBRequest.idl
ReadableStreamDefaultController.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
ReadableStreamDefaultController.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ReadableStreamDefaultController.idl
ReadableStreamDefaultReader.cpp LibJS+LibWeb: Allow instantiating DataBlock with an external buffer 2026-05-10 16:41:42 +02:00
ReadableStreamDefaultReader.h Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06:00
ReadableStreamDefaultReader.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02: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
ReadableStreamOperations.cpp LibWeb: Avoid temporary stream chunks for fetch bytes 2026-05-15 15:20:33 +02:00
ReadableStreamOperations.h LibWeb: Avoid temporary stream chunks for fetch bytes 2026-05-15 15:20:33 +02:00
ReadableStreamPipeTo.cpp LibWeb: Register shutdown-on-close handler once in ReadableStreamPipeTo 2025-12-08 13:57:14 -05:00
ReadableStreamPipeTo.h LibWeb: Register shutdown-on-close handler once in ReadableStreamPipeTo 2025-12-08 13:57:14 -05:00
ReadableStreamTee.cpp LibJS+LibWeb: Use the unified Visitor for Variant-holding members 2026-05-15 08:51:17 +02:00
ReadableStreamTee.h LibWeb: Move ReadableStream AOs into their own file 2025-04-18 06:55:40 -04:00
Transformer.idl LibWeb/Streams: Convert Transformer to IDL bindings conversion 2026-05-09 10:49:49 +02:00
TransformStream.cpp LibWeb/Streams: Convert Transformer to IDL bindings conversion 2026-05-09 10:49:49 +02:00
TransformStream.h LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
TransformStream.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
TransformStreamDefaultController.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
TransformStreamDefaultController.h LibWeb: Move ReadableStream AOs into their own file 2025-04-18 06:55:40 -04:00
TransformStreamDefaultController.idl
TransformStreamOperations.cpp LibWeb/Streams: Convert Transformer to IDL bindings conversion 2026-05-09 10:49:49 +02:00
TransformStreamOperations.h LibWeb/Streams: Convert Transformer to IDL bindings conversion 2026-05-09 10:49:49 +02:00
UnderlyingSink.idl LibWeb/Streams: Convert UnderlyingSink to IDL bindings conversion 2026-05-09 10:49:49 +02:00
UnderlyingSource.idl LibWeb/Streams: Convert UnderlyingSource to IDL bindings conversion 2026-05-09 10:49:49 +02:00
WritableStream.cpp LibWeb/Streams: Convert UnderlyingSink to IDL bindings conversion 2026-05-09 10:49:49 +02:00
WritableStream.h LibWeb/Bindings: Generate struct definitions from IDL dictionaries 2026-05-09 10:49:49 +02:00
WritableStream.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
WritableStreamDefaultController.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +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 LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
WritableStreamDefaultWriter.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
WritableStreamDefaultWriter.h LibWeb: Return GC::Ref for some Stream promise returning functions 2024-11-16 18:33:58 +01:00
WritableStreamDefaultWriter.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
WritableStreamOperations.cpp LibWeb/Streams: Convert UnderlyingSink to IDL bindings conversion 2026-05-09 10:49:49 +02:00
WritableStreamOperations.h LibWeb/Streams: Convert UnderlyingSink to IDL bindings conversion 2026-05-09 10:49:49 +02:00