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

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: 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/full-codegen/x64/full-codegen-x64.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/harmony-array.js
diff --git a/src/harmony-array.js b/src/harmony-array.js
index 885950b8ea0a324afd23b7a877499a32a8a191f3..779b67a80356bc4286a49f7f408183fac7d41f65 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698