Streams: make writable streams transferrable (#36588)

Making writable streams transferrable, part of
https://github.com/servo/servo/issues/34676

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
This commit is contained in:
Gregory Terzian 2025-04-18 16:33:36 +08:00 committed by GitHub
parent 05b5268061
commit fc201927ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 107 additions and 34 deletions

View file

@ -233,6 +233,8 @@ pub enum Transferrable {
MessagePort,
/// The `ReadableStream` interface.
ReadableStream,
/// The `WritableStream` interface.
WritableStream,
}
impl StructuredSerializedData {
@ -243,6 +245,7 @@ impl StructuredSerializedData {
match val {
Transferrable::MessagePort => is_field_empty(&self.ports),
Transferrable::ReadableStream => is_field_empty(&self.ports),
Transferrable::WritableStream => is_field_empty(&self.ports),
}
}