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

Unified Diff: src/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/collection.js
diff --git a/src/collection.js b/src/collection.js
index 718ca9be67e3d3d4e12277429a1e3c7eda3efaf0..315270c352e308244c334aa115aee01bc4ca967d 100644
--- a/src/collection.js
+++ b/src/collection.js
@@ -133,7 +133,7 @@ function SetConstructor(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);
}
@@ -244,7 +244,7 @@ function SetForEach(f, receiver) {
'Set.prototype.forEach', this);
}
- if (!IS_SPEC_FUNCTION(f)) throw MakeTypeError(kCalledNonCallable, f);
+ if (!IS_CALLABLE(f)) throw MakeTypeError(kCalledNonCallable, f);
var needs_wrapper = false;
if (IS_NULL(receiver)) {
if (%IsSloppyModeFunction(f)) receiver = UNDEFINED;
@@ -298,7 +298,7 @@ function MapConstructor(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);
}
@@ -435,7 +435,7 @@ function MapForEach(f, receiver) {
'Map.prototype.forEach', this);
}
- if (!IS_SPEC_FUNCTION(f)) throw MakeTypeError(kCalledNonCallable, f);
+ if (!IS_CALLABLE(f)) throw MakeTypeError(kCalledNonCallable, f);
var needs_wrapper = false;
if (IS_NULL(receiver)) {
if (%IsSloppyModeFunction(f)) receiver = UNDEFINED;
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/execution.h » ('j') | src/objects-debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698