]> git.kaiwu.me - quickjs.git/commit
Read byteOffset for detached buffers
authorNick Vatamaniuc <vatamane@gmail.com>
Sat, 7 Jun 2025 04:42:50 +0000 (00:42 -0400)
committerNick Vatamaniuc <vatamane@gmail.com>
Sat, 7 Jun 2025 05:37:54 +0000 (01:37 -0400)
commit00b1d8d0b2d06e540444245b54a8fd86ccf7260b
tree7ce19204b363ed8a2709c1a9b1274057eb82841a
parent638ec8ca5e1d4aed002a9fb3ef3358e2a6bc42ab
Read byteOffset for detached buffers

The spec [1] expects to read `byteOffset` even for detached buffers.

Noticed a new test262 test [2] failed and there an an existing one we skipped
as well for the same reason.

[1] https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
[2] https://github.com/tc39/test262/blob/main/test/built-ins/TypedArray/prototype/subarray/byteoffset-with-detached-buffer.js

Fix: https://github.com/bellard/quickjs/issues/417
quickjs.c
test262_errors.txt