- From: Domenic Denicola <notifications@github.com>
- Date: Wed, 14 Jul 2021 14:43:41 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 14 July 2021 21:43:53 UTC
@domenic commented on this pull request.
> +<div algorithm>
+ To <dfn export for="ReadableStream">enqueue</dfn> the JavaScript value |chunk| into a
+ {{ReadableStream}} |stream|:
+
+ 1. If |stream|.[=ReadableStream/[[controller]]=] [=implements=]
+ {{ReadableStreamDefaultController}},
+ 1. Perform ! [$ReadableStreamDefaultControllerEnqueue$](|stream|.[=ReadableStream/[[controller]]=],
+ |chunk|).
+ 1. Otherwise,
+ 1. Assert: |stream|.[=ReadableStream/[[controller]]=] [=implements=]
+ {{ReadableByteStreamController}}.
+ 1. Assert: |chunk| is an {{ArrayBufferView}}.
+ 1. Let |byobRequest| be !
+ [$ReadableByteStreamControllerGetBYOBRequest$](|stream|.[=ReadableStream/[[controller]]=]).
+ 1. If |byobRequest| is non-null, and |chunk|.\[[ViewedArrayBuffer]].\[[ArrayBufferData]] is the
+ same [=Data Block=] as |byobRequest|.\[[view]].\[[ViewedArrayBuffer]].\[[ArrayBufferData]],
Oh, dang, you're right. In that case we should probably solve it by, per the above discussion, prohibiting transferring at a spec level (but allowing it an implementation level as long as the implementation does appropriate behind-the-scenes contortions).
--
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/1130#discussion_r669975382
Received on Wednesday, 14 July 2021 21:43:53 UTC