ladybird/Libraries/LibWeb/Streams
Aliaksandr Kalenik 346c083d58
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
LibWeb: Don't drop messages received before MessagePort is enabled
This change implements following behavior defined in the spec:
https://html.spec.whatwg.org/multipage/web-messaging.html#examples-5
> The start() method, whether called explicitly or implicitly (by
setting onmessage), starts the flow of messages: messages posted on
message ports are initially paused, so that they don't get dropped on
the floor before the script has had a chance to set up its handlers.

Now we don't read bytes from the underlying transport socket until the
message port transitions to the enabled state. This required the
following places to explicitly enable the message port, because now,
when it actually matters, we must do so, or otherwise sent messages will
get stuck:
- `onmessage` attribute setter in DedicatedWorkerGlobalScope, because
  it implicitly sets the onmessage handler for the worker's underlying
  port.
- Stream API operations where the message port enabling steps were
  previously marked as FIXMEs.
2025-06-08 18:26:13 +02:00
..
AbstractOperations.cpp LibWeb: Don't drop messages received before MessagePort is enabled 2025-06-08 18:26:13 +02:00
AbstractOperations.h LibWeb: Implement transferable streams AOs 2025-05-21 06:54:44 -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
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
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
QueuingStrategyInit.h
QueuingStrategyInit.idl
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
ReadableStream.cpp LibWeb: Implement ReadableStream transfer 2025-05-21 06:54:44 -04:00
ReadableStream.h LibWeb: Implement ReadableStream transfer 2025-05-21 06:54:44 -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 Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06:00
ReadableStreamBYOBReader.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ReadableStreamBYOBReader.idl
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
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
ReadableStreamDefaultReader.cpp LibWeb: Remove unused VM from ReadLoopReadRequest 2025-04-30 09:30:15 -04:00
ReadableStreamDefaultReader.h Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06:00
ReadableStreamDefaultReader.idl
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: 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: Implement TransformStream transfer 2025-05-21 06:54:44 -04:00
TransformStream.h LibWeb: Implement TransformStream transfer 2025-05-21 06:54:44 -04:00
TransformStream.idl
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
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: Implement WritableStream transfer 2025-05-21 06:54:44 -04:00
WritableStream.h LibWeb: Implement WritableStream transfer 2025-05-21 06:54:44 -04:00
WritableStream.idl
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
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
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