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

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: Rebase again. Created 5 years, 3 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
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/execution.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/collection.js
diff --git a/src/collection.js b/src/collection.js
index ad4ad1e0847be7ee2e2b6a55b186491fc3d3f6ba..f7db8625c5db3d3020f4eac0e348790dc21bb8e1 100644
--- a/src/collection.js
+++ b/src/collection.js
@@ -134,7 +134,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);
}
@@ -245,7 +245,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;
@@ -299,7 +299,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);
}
@@ -436,7 +436,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698