Bug 215485 - Implement transferable streams
Summary: Implement transferable streams
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 262531 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-13 19:07 PDT by Adam Rice
Modified: 2024-03-15 09:20 PDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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?