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

Unified Diff: src/js/typedarray.js

Issue 1583773005: Construct instances of base class from TypedArray.prototype.subarray (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add test case in bug as a regression test Created 4 years, 11 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 | « no previous file | test/mjsunit/es6/legacy-subclassing.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 631add44eb5999df1ef45bdc5d5701adc6a54478..b3e1c829dd62b9926a3c335f952a20a233dc22db 100644
--- a/src/js/typedarray.js
+++ b/src/js/typedarray.js
@@ -128,9 +128,10 @@ function TypedArrayCreate(constructor, arg0, arg1, arg2) {
return newTypedArray;
}
-function TypedArraySpeciesCreate(exemplar, arg0, arg1, arg2) {
+function TypedArraySpeciesCreate(exemplar, arg0, arg1, arg2, conservative) {
var defaultConstructor = TypedArrayDefaultConstructor(exemplar);
- var constructor = SpeciesConstructor(exemplar, defaultConstructor);
+ var constructor = SpeciesConstructor(exemplar, defaultConstructor,
+ conservative);
return TypedArrayCreate(constructor, arg0, arg1, arg2);
}
@@ -292,7 +293,7 @@ function NAMESubArray(begin, end) {
var beginByteOffset =
%_ArrayBufferViewGetByteOffset(this) + beginInt * ELEMENT_SIZE;
return TypedArraySpeciesCreate(this, %TypedArrayGetBuffer(this),
- beginByteOffset, newLength);
+ beginByteOffset, newLength, true);
}
endmacro
« no previous file with comments | « no previous file | test/mjsunit/es6/legacy-subclassing.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698