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

Unified Diff: src/js/arraybuffer.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 | « no previous file | src/js/i18n.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/arraybuffer.js
diff --git a/src/js/arraybuffer.js b/src/js/arraybuffer.js
index 1159488160bc73f8919a639f72fe84fe88f499a4..1e405638d582936b83461502706d0b6b9310f920 100644
--- a/src/js/arraybuffer.js
+++ b/src/js/arraybuffer.js
@@ -29,7 +29,7 @@ utils.Import(function(from) {
// -------------------------------------------------------------------
function ArrayBufferConstructor(length) { // length = 1
- if (%_IsConstructCall()) {
+ if (!IS_UNDEFINED(new.target)) {
var byteLength = ToPositiveInteger(length, kInvalidArrayBufferLength);
%ArrayBufferInitialize(this, byteLength, kNotShared);
} else {
« no previous file with comments | « no previous file | src/js/i18n.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698