Chromium Code Reviews| Index: src/js/typedarray.js |
| diff --git a/src/js/typedarray.js b/src/js/typedarray.js |
| index 4cd678e03f9b223d5dc423dcbc5f2f8e63b341d1..5b8d5926a989a6c8327af279945e8c25f88f5180 100644 |
| --- a/src/js/typedarray.js |
| +++ b/src/js/typedarray.js |
| @@ -147,7 +147,9 @@ function NAMEConstructByTypedArray(obj, typedArray) { |
| var byteLength = %_ArrayBufferViewGetByteLength(typedArray); |
| var newByteLength = length * ELEMENT_SIZE; |
| %typed_array_construct_by_array_like(obj, typedArray, length, ELEMENT_SIZE); |
| - var bufferConstructor = SpeciesConstructor(srcData, GlobalArrayBuffer); |
| + var bufferConstructor = (IS_SHAREDARRAYBUFFER(srcData)) |
|
adamk
2017/04/07 17:24:21
Nit: no need for the extra parens (the macros alre
binji
2017/04/07 18:55:36
Done.
|
| + ? GlobalArrayBuffer |
| + : SpeciesConstructor(srcData, GlobalArrayBuffer); |
| var prototype = bufferConstructor.prototype; |
| // TODO(littledan): Use the right prototype based on bufferConstructor's realm |
| if (IS_RECEIVER(prototype) && prototype !== GlobalArrayBufferPrototype) { |