Re: [whatwg/streams] Support transferable streams (postMessage) (#1053)

@ricea commented on this pull request.



> @@ -5740,6 +5878,152 @@ for="value-with-size">value</dfn> and <dfn for="value-with-size">size</dfn>.
  1. Set |container|.\[[queueTotalSize]] to 0.
 </div>
 
+<h3 id="transferrable-streams">Transferable streams</h3>
+
+Transferable streams are implemented using a special kind of identity transform which has the
+[=writable side=] in one realm and the [=readable side=] in another realm. The following abstract
+operations are used to implement these "cross-realm transforms".
+
+<div algorithm>
+ <dfn abstract-op lt="PackAndPostMessage">PackAndPostMessage(|port|, |type|, |value|)</dfn> performs
+ the following steps:
+
+ 1. Let |message| be [$OrdinaryObjectCreate$](null).

OrdinaryObjectCreate does not return a completion record. This is non-obvious from the definition https://tc39.es/ecma262/2020/#sec-ordinaryobjectcreate but clear from how it is used elsewhere: https://tc39.es/ecma262/2020/#sec-createiterresultobject.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/1053#discussion_r454163788

Received on Tuesday, 14 July 2020 07:39:27 UTC