Bug 215485

Summary: Implement transferable streams
Product: WebKit Reporter: Adam Rice <ricea>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: jimmy, joan, pascalschilp, safwen.baroudi, sam.verschueren, tenphi, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Adam Rice 2020-08-13 19:07:02 PDT
Transferable streams permit streams to be transferred to a worker or other realm using postMessage(), where they can be used just like the original stream.

Example:

const rs = new ReadableStream();
window.postMessage(rs, '*', [rs]);

See the explainer https://github.com/whatwg/streams/blob/master/transferable-streams-explainer.md for more motivation.

See the spec change at https://github.com/whatwg/streams/pull/1053 and the web platform tests at https://github.com/web-platform-tests/wpt/pull/24546.
Comment 1 Radar WebKit Bug Importer 2020-08-20 19:07:16 PDT
<rdar://problem/67522801>
Comment 2 Jimmy Wärting 2023-01-13 13:29:30 PST
Importance += 1
Comment 3 youenn fablet 2023-10-03 12:25:41 PDT
*** Bug 262531 has been marked as a duplicate of this bug. ***
Comment 4 Andrey 2024-03-15 09:20:47 PDT
I accidentally found out that it only happens if you use the following header:
Cross-Origin-Embedder-Policy `credentialless` instead of `require-corp`.
Other engines are tolerant of this difference.

Is it on purpose?