Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Unified Diff: src/js/typedarray.js

Issue 2798403004: [SAB] Fix {newtarget-prototype-is-not-object,proto-from-ctor-realm} tests (Closed)
Patch Set: fix broken test Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | test/mjsunit/harmony/sharedarraybuffer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/bootstrapper.cc ('k') | test/mjsunit/harmony/sharedarraybuffer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698