[builtins] Fix overly strict CHECK in TypedArray.Set.
The existing CHECK assumed that the source and destination could not have the same buffer, but they actually can as long as the data ranges do not overlap within the buffer. Change the check to look for this more relaxed condition instead. Moved the check outside of the memcpy case as well, given that it should also apply for the slower, element-by-element copy as well. Also use JSTypedArray::element_size() to get the element size instead of the helper on the FixedTypedArrayBase. This lets us change that helper back to private again. Bug: chromium:717022 Change-Id: I2eca1df1e87444c5db397e0b7cf686cefe67d29c Reviewed-on: https://chromium-review.googlesource.com/493147 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#45035}
Showing
Please
register
or
sign in
to comment