-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Tried to update to the latest test262 commit in #408 and noticed a failure in the new byteOffset test: byteoffset-with-detached-buffer
In assert.sameValue(byteOffset, 2 * TA.BYTES_PER_ELEMENT);
byteOffset is 8
and not 16
as the test expects.
In QuickJS we zero the byteOffset
if the buffer is detached, but oddly enough, the spec doesn't call for that: [13. Let srcByteOffset be O.[[ByteOffset]]]
(https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray). A bit higher in If [IsTypedArrayOutOfBounds](https://tc39.es/ecma262/#sec-istypedarrayoutofbounds)(srcRecord) is true
we notice the buffer is detached but that just sets the srcLength = 0
and doesn't throw an error.
Metadata
Metadata
Assignees
Labels
No labels