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

Unified Diff: src/harmony-array.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/harmony-array.js
diff --git a/src/harmony-array.js b/src/harmony-array.js
index 49176460ad2ee42fe38dcc4d6ef18d20e3f4e06e..6ef97fdeb2abbd26767383a850449c562e1a0185 100644
--- a/src/harmony-array.js
+++ b/src/harmony-array.js
@@ -91,7 +91,7 @@ function ArrayCopyWithin(target, start, end) {
}
function InnerArrayFind(predicate, thisArg, array, length) {
- if (!IS_SPEC_FUNCTION(predicate)) {
+ if (!IS_CALLABLE(predicate)) {
throw MakeTypeError(kCalledNonCallable, predicate);
}
@@ -124,7 +124,7 @@ function ArrayFind(predicate, thisArg) {
}
function InnerArrayFindIndex(predicate, thisArg, array, length) {
- if (!IS_SPEC_FUNCTION(predicate)) {
+ if (!IS_CALLABLE(predicate)) {
throw MakeTypeError(kCalledNonCallable, predicate);
}
@@ -210,7 +210,7 @@ function ArrayFrom(arrayLike, mapfn, receiver) {
var mapping = !IS_UNDEFINED(mapfn);
if (mapping) {
- if (!IS_SPEC_FUNCTION(mapfn)) {
+ if (!IS_CALLABLE(mapfn)) {
throw MakeTypeError(kCalledNonCallable, mapfn);
} else if (%IsSloppyModeFunction(mapfn)) {
if (IS_NULL(receiver)) {
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/hydrogen.h » ('j') | src/objects-debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698