Index: src/typedarray.js |
diff --git a/src/typedarray.js b/src/typedarray.js |
index 28d073aa2e0ab7488396fa6f65bc686f7d7c91e2..7c08fce555ce466acb966831c14c057ca110687b 100644 |
--- a/src/typedarray.js |
+++ b/src/typedarray.js |
@@ -127,7 +127,7 @@ function NAMEConstructByArrayLike(obj, arrayLike) { |
function NAMEConstructor(arg1, arg2, arg3) { |
if (%_IsConstructCall()) { |
- if (IS_ARRAYBUFFER(arg1)) { |
+ if (IS_ARRAYBUFFER(arg1) || IS_SHAREDARRAYBUFFER(arg1)) { |
NAMEConstructByArrayBuffer(this, arg1, arg2, arg3); |
} else if (IS_NUMBER(arg1) || IS_STRING(arg1) || |
IS_BOOLEAN(arg1) || IS_UNDEFINED(arg1)) { |
@@ -347,6 +347,7 @@ TYPED_ARRAYS(SETUP_TYPED_ARRAY) |
function DataViewConstructor(buffer, byteOffset, byteLength) { // length = 3 |
if (%_IsConstructCall()) { |
+ // TODO(binji): support SharedArrayBuffers? |
if (!IS_ARRAYBUFFER(buffer)) throw MakeTypeError(kDataViewNotArrayBuffer); |
if (!IS_UNDEFINED(byteOffset)) { |
byteOffset = $toPositiveInteger(byteOffset, kInvalidDataViewOffset); |