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

Unified Diff: src/js/weak-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 | « src/js/proxy.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/weak-collection.js
diff --git a/src/js/weak-collection.js b/src/js/weak-collection.js
index c4568f97f4f38e7f18893511b7f37c0bb1355d77..0be714109e63b5a4500c53bf5ddfc8cf6be4f113 100644
--- a/src/js/weak-collection.js
+++ b/src/js/weak-collection.js
@@ -29,7 +29,7 @@ utils.Import(function(from) {
// Harmony WeakMap
function WeakMapConstructor(iterable) {
- if (!%_IsConstructCall()) {
+ if (IS_UNDEFINED(new.target)) {
throw MakeTypeError(kConstructorNotFunction, "WeakMap");
}
@@ -118,7 +118,7 @@ utils.InstallFunctions(GlobalWeakMap.prototype, DONT_ENUM, [
// Harmony WeakSet
function WeakSetConstructor(iterable) {
- if (!%_IsConstructCall()) {
+ if (IS_UNDEFINED(new.target)) {
throw MakeTypeError(kConstructorNotFunction, "WeakSet");
}
« no previous file with comments | « src/js/proxy.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698