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

Unified Diff: src/js/typedarray.js

Issue 2587413002: [es6] Fix the %TypedArray% constructor. (Closed)
Patch Set: Created 4 years 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/regress/regress-5763-1.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 b889d8bafc252c6eac6decfa9fb15831e63ce24b..488e94912114eab13691a82e2231d2d19782c02a 100644
--- a/src/js/typedarray.js
+++ b/src/js/typedarray.js
@@ -844,12 +844,7 @@ function TypedArrayFrom(source, mapfn, thisArg) {
// TODO(bmeurer): Migrate this to a proper builtin.
function TypedArrayConstructor() {
- if (IS_UNDEFINED(new.target)) {
- throw %make_type_error(kConstructorNonCallable, "TypedArray");
- }
- if (new.target === GlobalTypedArray) {
- throw %make_type_error(kConstructAbstractClass, "TypedArray");
- }
+ throw %make_type_error(kConstructAbstractClass, "TypedArray");
}
function TypedArraySpecies() {
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-5763-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698