add several TypedArray methods to Rust JSG#6386
Conversation
c1ad28b to
0cf950c
Compare
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
Adds byte_offset(), data(), as_slice(), as_mut_slice() methods to TypedArray locals, plus FromJS impls for Local<T> typed arrays. Overall well-structured with good test coverage.
Findings (highest severity first):
- [MED]
as_mut_slicesafety comment understates the aliasing risk — two differentLocalhandles can alias the same buffer memory. - [LOW]
local_typed_array_byte_lengthis declared in FFI (C++, header, and Rust bridge) but never called from Rust — dead code.
This review was generated by an AI assistant and may contain inaccuracies.
|
I'm Bonk, and I've done a quick review of your PR. Review posted on PR #6386 with 2 findings:
|
93902ba to
8e79e53
Compare
8e79e53 to
08cae6c
Compare
9b527bb to
d88cf6b
Compare
Adds byte_offset(), byte_length(), data(), as_slice() and as_mut_slice() methods for TypedArray (and other *Array structs)
Changes are splitted from #6360