From 2811932a34b5cfdb0a6e33ad204f747ee9c71292 Mon Sep 17 00:00:00 2001 From: Taym Haddadi Date: Wed, 22 Jan 2025 02:32:19 +0100 Subject: [PATCH] Fix byte length getting [[ViewedArrayBuffer]].[[ArrayBufferByteLength]] was incorrectly used; [[ViewedArrayBuffer]].[[ByteLength]] is the actual internal slot. --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index de99d775..43149ff9 100644 --- a/index.bs +++ b/index.bs @@ -1446,7 +1446,7 @@ value: newViewOnSameMemory, done: true } for closed streams. If the strea method steps are: 1. If |view|.\[[ByteLength]] is 0, return [=a promise rejected with=] a {{TypeError}} exception. - 1. If |view|.\[[ViewedArrayBuffer]].\[[ArrayBufferByteLength]] is 0, return [=a promise rejected + 1. If |view|.\[[ViewedArrayBuffer]].\[[ByteLength]] is 0, return [=a promise rejected with=] a {{TypeError}} exception. 1. If ! [$IsDetachedBuffer$](|view|.\[[ViewedArrayBuffer]]) is true, return [=a promise rejected with=] a {{TypeError}} exception. @@ -1876,7 +1876,7 @@ has the following [=struct/items=]: for="ReadableByteStreamController">enqueue(|chunk|) method steps are: 1. If |chunk|.\[[ByteLength]] is 0, throw a {{TypeError}} exception. - 1. If |chunk|.\[[ViewedArrayBuffer]].\[[ArrayBufferByteLength]] is 0, throw a {{TypeError}} + 1. If |chunk|.\[[ViewedArrayBuffer]].\[[ByteLength]] is 0, throw a {{TypeError}} exception. 1. If [=this=].[=ReadableByteStreamController/[[closeRequested]]=] is true, throw a {{TypeError}} exception.