Return a slice when querying contents of a typed array#705
Return a slice when querying contents of a typed array#705simonwuelker wants to merge 2 commits intoservo:mainfrom
Conversation
This makes out-of-bounds access to typed arrays harder to do by accident. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
sagudev
left a comment
There was a problem hiding this comment.
LGTM, but such change should get companion PR in servo before landing (so we do not land something that borks servo).
CI is blocked by jidicula/clang-format-action#267
Servo currently depends on the crates.io version of mozjs and I think we want to keep it that way - is releasing a new version for this change okay? This is a breaking change, but it doesn't require any changes to servo. |
Yes, that's okay. |
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
I've opened servo/servo#42688 |
In rust there is no need to pass
(*mut T, usize)around, as that is just a*mut [T]. This makes out-of-bounds access to typed arrays harder to do by accident.Testing: Behaviour should be unchanged, no new tests are written
Companion PR: servo/servo#42688