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

Unified Diff: src/weak-collection.js

Issue 1316933002: [es6] Initial steps towards a correct implementation of IsCallable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months 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
Index: src/weak-collection.js
diff --git a/src/weak-collection.js b/src/weak-collection.js
index 75350931ed22fed9577e37ef1b56756c59c1d116..bd15f862eb86c4bcf53de13daf2b54e3ccc00381 100644
--- a/src/weak-collection.js
+++ b/src/weak-collection.js
@@ -24,7 +24,7 @@ function WeakMapConstructor(iterable) {
if (!IS_NULL_OR_UNDEFINED(iterable)) {
var adder = this.set;
- if (!IS_SPEC_FUNCTION(adder)) {
+ if (!IS_CALLABLE(adder)) {
throw MakeTypeError(kPropertyNotFunction, 'set', this);
}
for (var nextItem of iterable) {
@@ -113,7 +113,7 @@ function WeakSetConstructor(iterable) {
if (!IS_NULL_OR_UNDEFINED(iterable)) {
var adder = this.add;
- if (!IS_SPEC_FUNCTION(adder)) {
+ if (!IS_CALLABLE(adder)) {
throw MakeTypeError(kPropertyNotFunction, 'add', this);
}
for (var value of iterable) {

Powered by Google App Engine
This is Rietveld 408576698