| Index: src/typedarray.js
|
| diff --git a/src/typedarray.js b/src/typedarray.js
|
| index 21dd9c82d14f02d1d265f87604386e57cd09f890..0c0cb71b2a3bf883972384a8cb1d86be23baa299 100644
|
| --- a/src/typedarray.js
|
| +++ b/src/typedarray.js
|
| @@ -58,7 +58,7 @@ macro TYPED_ARRAY_CONSTRUCTOR(ARRAY_ID, NAME, ELEMENT_SIZE)
|
|
|
| if (offset % ELEMENT_SIZE !== 0) {
|
| throw MakeRangeError("invalid_typed_array_alignment",
|
| - "start offset", "NAME", ELEMENT_SIZE);
|
| + ["start offset", "NAME", ELEMENT_SIZE]);
|
| }
|
| if (offset > bufferByteLength) {
|
| throw MakeRangeError("invalid_typed_array_offset");
|
| @@ -70,7 +70,7 @@ macro TYPED_ARRAY_CONSTRUCTOR(ARRAY_ID, NAME, ELEMENT_SIZE)
|
| if (IS_UNDEFINED(length)) {
|
| if (bufferByteLength % ELEMENT_SIZE !== 0) {
|
| throw MakeRangeError("invalid_typed_array_alignment",
|
| - "byte length", "NAME", ELEMENT_SIZE);
|
| + ["byte length", "NAME", ELEMENT_SIZE]);
|
| }
|
| newByteLength = bufferByteLength - offset;
|
| newLength = newByteLength / ELEMENT_SIZE;
|
| @@ -243,6 +243,10 @@ function TypedArraySet(obj, offset) {
|
| if (intOffset < 0) {
|
| throw MakeTypeError("typed_array_set_negative_offset");
|
| }
|
| +
|
| + if (intOffset > %MaxSmi()) {
|
| + throw MakeRangeError("typed_array_set_source_too_large");
|
| + }
|
| switch (%TypedArraySetFastCases(this, obj, intOffset)) {
|
| // These numbers should be synchronized with runtime.cc.
|
| case 0: // TYPED_ARRAY_SET_TYPED_ARRAY_SAME_TYPE
|
|
|