Index: src/js/typedarray.js |
diff --git a/src/js/typedarray.js b/src/js/typedarray.js |
index 6e8f3c76712845ae73812d87811e5a25e4e05e92..3777507235ef603a74c655a6f52560d4259d510f 100644 |
--- a/src/js/typedarray.js |
+++ b/src/js/typedarray.js |
@@ -161,8 +161,7 @@ function NAMEConstructByArrayBuffer(obj, buffer, byteOffset, length) { |
} |
newByteLength = bufferByteLength - offset; |
if (newByteLength < 0) { |
- throw %make_range_error(kInvalidTypedArrayAlignment, |
- "byte length", "NAME", ELEMENT_SIZE); |
+ throw %make_range_error(kInvalidOffset, offset); |
} |
} else { |
newByteLength = length * ELEMENT_SIZE; |