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

Unified Diff: src/js/typedarray.js

Issue 1474343002: Use new.target in favor of %_IsConstructCall intrinsic (2). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_js-use-new-target-1
Patch Set: Skip ignition. Created 5 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 | « src/js/i18n.js ('k') | src/js/v8natives.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 c25966ce992f8a8a0e34f696d6e42d57d212fe07..2c0fc126f6e9c3b63fb3ed2a5f1c87866cc8be27 100644
--- a/src/js/typedarray.js
+++ b/src/js/typedarray.js
@@ -203,7 +203,7 @@ function NAMEConstructByIterable(obj, iterable, iteratorFn) {
}
function NAMEConstructor(arg1, arg2, arg3) {
- if (%_IsConstructCall()) {
+ if (!IS_UNDEFINED(new.target)) {
if (IS_ARRAYBUFFER(arg1) || IS_SHAREDARRAYBUFFER(arg1)) {
NAMEConstructByArrayBuffer(this, arg1, arg2, arg3);
} else if (IS_NUMBER(arg1) || IS_STRING(arg1) ||
« no previous file with comments | « src/js/i18n.js ('k') | src/js/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698