Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 259548.785@safari-7615-branch (f2a2820). https://bugs.web…
…kit.org/show_bug.cgi?id=257387 [JSC] Recompute length properly when resize happens during TypedArray#copyWithin https://bugs.webkit.org/show_bug.cgi?id=257387 rdar://109851495 Reviewed by Mark Lam. copyWithin's side effectful operation can resize resizable ArrayBuffer. We have a code catching this and recompute the appropriate copy count again, but it can overflow if `to` or `from` are larger than the newly updated `length`. This patch handles this case correctly: returning since there is no copying content in this case. * JSTests/stress/resizable-array-buffer-copy-within-length-update.js: Added. (call_back): * Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h: (JSC::genericTypedArrayViewProtoFuncCopyWithin): Canonical link: https://commits.webkit.org/259548.785@safari-7615-branch
- Loading branch information