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

Unified Diff: src/js/weak-collection.js

Issue 1531843003: Rename IS_SPEC_OBJECT macro to IS_RECEIVER. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/v8natives.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 8ab038ecdcf0c1b522ac7bff00bad31b82a64d97..308b9edef7cb70b31161d187bb24f828c7778e66 100644
--- a/src/js/weak-collection.js
+++ b/src/js/weak-collection.js
@@ -41,7 +41,7 @@ function WeakMapConstructor(iterable) {
throw MakeTypeError(kPropertyNotFunction, adder, 'set', this);
}
for (var nextItem of iterable) {
- if (!IS_SPEC_OBJECT(nextItem)) {
+ if (!IS_RECEIVER(nextItem)) {
throw MakeTypeError(kIteratorValueNotAnObject, nextItem);
}
%_Call(adder, this, nextItem[0], nextItem[1]);
@@ -55,7 +55,7 @@ function WeakMapGet(key) {
throw MakeTypeError(kIncompatibleMethodReceiver,
'WeakMap.prototype.get', this);
}
- if (!IS_SPEC_OBJECT(key)) return UNDEFINED;
+ if (!IS_RECEIVER(key)) return UNDEFINED;
var hash = GetExistingHash(key);
if (IS_UNDEFINED(hash)) return UNDEFINED;
return %WeakCollectionGet(this, key, hash);
@@ -67,7 +67,7 @@ function WeakMapSet(key, value) {
throw MakeTypeError(kIncompatibleMethodReceiver,
'WeakMap.prototype.set', this);
}
- if (!IS_SPEC_OBJECT(key)) throw MakeTypeError(kInvalidWeakMapKey);
+ if (!IS_RECEIVER(key)) throw MakeTypeError(kInvalidWeakMapKey);
return %WeakCollectionSet(this, key, value, GetHash(key));
}
@@ -77,7 +77,7 @@ function WeakMapHas(key) {
throw MakeTypeError(kIncompatibleMethodReceiver,
'WeakMap.prototype.has', this);
}
- if (!IS_SPEC_OBJECT(key)) return false;
+ if (!IS_RECEIVER(key)) return false;
var hash = GetExistingHash(key);
if (IS_UNDEFINED(hash)) return false;
return %WeakCollectionHas(this, key, hash);
@@ -89,7 +89,7 @@ function WeakMapDelete(key) {
throw MakeTypeError(kIncompatibleMethodReceiver,
'WeakMap.prototype.delete', this);
}
- if (!IS_SPEC_OBJECT(key)) return false;
+ if (!IS_RECEIVER(key)) return false;
var hash = GetExistingHash(key);
if (IS_UNDEFINED(hash)) return false;
return %WeakCollectionDelete(this, key, hash);
@@ -141,7 +141,7 @@ function WeakSetAdd(value) {
throw MakeTypeError(kIncompatibleMethodReceiver,
'WeakSet.prototype.add', this);
}
- if (!IS_SPEC_OBJECT(value)) throw MakeTypeError(kInvalidWeakSetValue);
+ if (!IS_RECEIVER(value)) throw MakeTypeError(kInvalidWeakSetValue);
return %WeakCollectionSet(this, value, true, GetHash(value));
}
@@ -151,7 +151,7 @@ function WeakSetHas(value) {
throw MakeTypeError(kIncompatibleMethodReceiver,
'WeakSet.prototype.has', this);
}
- if (!IS_SPEC_OBJECT(value)) return false;
+ if (!IS_RECEIVER(value)) return false;
var hash = GetExistingHash(value);
if (IS_UNDEFINED(hash)) return false;
return %WeakCollectionHas(this, value, hash);
@@ -163,7 +163,7 @@ function WeakSetDelete(value) {
throw MakeTypeError(kIncompatibleMethodReceiver,
'WeakSet.prototype.delete', this);
}
- if (!IS_SPEC_OBJECT(value)) return false;
+ if (!IS_RECEIVER(value)) return false;
var hash = GetExistingHash(value);
if (IS_UNDEFINED(hash)) return false;
return %WeakCollectionDelete(this, value, hash);
« no previous file with comments | « src/js/v8natives.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698