| Index: src/typedarray.js
|
| diff --git a/src/typedarray.js b/src/typedarray.js
|
| index 1e67bc30c6cd7d21023620acec95a9aa69bb0e42..8d7f4deb966dbe1bbc778a110a868fac0c680dc5 100644
|
| --- a/src/typedarray.js
|
| +++ b/src/typedarray.js
|
| @@ -69,6 +69,9 @@ function CreateTypedArrayConstructor(name, elementSize, arrayId, constructor) {
|
|
|
| function ConstructByLength(obj, length) {
|
| var l = ToPositiveInteger(length, "invalid_typed_array_length");
|
| + if (l > %MaxSmi()) {
|
| + throw MakeRangeError("invalid_typed_array_length");
|
| + }
|
| var byteLength = l * elementSize;
|
| var buffer = new $ArrayBuffer(byteLength);
|
| %TypedArrayInitialize(obj, arrayId, buffer, 0, byteLength);
|
|
|