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

Unified Diff: src/js/collection.js

Issue 1477073005: Use new.target in favor of %_IsConstructCall intrinsic (1). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/harmony-sharedarraybuffer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/collection.js
diff --git a/src/js/collection.js b/src/js/collection.js
index 221f0e107831a486599ccb00f7e18dc4e728364b..7c6aa6bc26358899ab4cb70e1943509dacf4458c 100644
--- a/src/js/collection.js
+++ b/src/js/collection.js
@@ -125,7 +125,7 @@ function GetHash(key) {
// Harmony Set
function SetConstructor(iterable) {
- if (!%_IsConstructCall()) {
+ if (IS_UNDEFINED(new.target)) {
throw MakeTypeError(kConstructorNotFunction, "Set");
}
@@ -281,7 +281,7 @@ utils.InstallFunctions(GlobalSet.prototype, DONT_ENUM, [
// Harmony Map
function MapConstructor(iterable) {
- if (!%_IsConstructCall()) {
+ if (IS_UNDEFINED(new.target)) {
throw MakeTypeError(kConstructorNotFunction, "Map");
}
« no previous file with comments | « no previous file | src/js/harmony-sharedarraybuffer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698