Re: [heycam/webidl] Detached ArrayBuffer objects should not throw (#605)

domenic commented on this pull request.



> @@ -8171,8 +8171,8 @@ a reference to the same object that the IDL value represents.
         1.  Set |offset| to the value of |O|’s \[[ByteOffset]] [=internal slot=].
         1.  Set |length| to the value of |O|’s \[[ByteLength]] [=internal slot=].
     1.  Otherwise, set |length| to the value of |O|’s \[[ArrayBufferByteLength]] [=internal slot=].
-    1.  If <a abstract-op>IsDetachedBuffer</a>(|O|), then
-        [=ECMAScript/throw=] a {{ECMAScript/TypeError}}.
+    1.  If <a abstract-op>IsDetachedBuffer</a>(|arrayBuffer|) is <emu-val>true</emu-val>, then
+        return a reference to or a copy of (as required) the empty byte sequence.

I think you should just return the empty byte sequence. A copy or reference doesn't really make sense here.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/605#pullrequestreview-190803905

Received on Wednesday, 9 January 2019 16:15:30 UTC