Re: [whatwg/streams] Various fixes for readable byte streams (#1123)

@ricea commented on this pull request.

lgtm except for one thing.

> @@ -2898,7 +2908,17 @@ The following abstract operations support the implementation of the
  1. Let |buffer| be |chunk|.\[[ViewedArrayBuffer]].
  1. Let |byteOffset| be |chunk|.\[[ByteOffset]].
  1. Let |byteLength| be |chunk|.\[[ByteLength]].
- 1. Let |transferredBuffer| be ! [$TransferArrayBuffer$](|buffer|).
+ 1. If ! [$IsDetachedBuffer$](|buffer|) is true, throw a {{TypeError}} exception.
+ 1. Let |transferredBuffer| be ? [$TransferArrayBuffer$](|buffer|).
+ 1. If |controller|.[=ReadableByteStreamController/[[pendingPullIntos]]=] is not
+    [=list/is empty|empty=],
+  1. Let |firstPendingPullInto| be
+     |controller|.[=ReadableByteStreamController/[[pendingPullIntos]]=][0].
+  1. If ! [$IsDetachedBuffer$](|firstPendingPullInto|'s [=pull-into descriptor/buffer=])
+     is true, throw a {{TypeError}} exception.
+  1. Set |firstPendingPullInto|'s [=pull-into descriptor/buffer=] to !
+     [$TransferArrayBuffer$]([=pull-into descriptor/buffer=]).

I think this should be `[$TransferArrayBuffer$](|firstPendingPullInto|'s [=pull-into descriptor/buffer=])`

-- 
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/1123#pullrequestreview-664417822

Received on Thursday, 20 May 2021 14:07:08 UTC