Index: src/array.js |
diff --git a/src/array.js b/src/array.js |
index e6c13d9547c5f114480706f46ebd2a6d3c2bdd69..f6194a9bf46cc9f3400cd343ea0805b4558095fb 100644 |
--- a/src/array.js |
+++ b/src/array.js |
@@ -208,7 +208,7 @@ function ConvertToLocaleString(e) { |
// Call ToString if toLocaleString is not a function. |
// See issue 877615. |
var e_obj = ToObject(e); |
- if (IS_FUNCTION(e_obj.toLocaleString)) |
+ if (IS_SPEC_FUNCTION(e_obj.toLocaleString)) |
return ToString(e_obj.toLocaleString()); |
else |
return ToString(e); |
@@ -730,7 +730,7 @@ function ArraySort(comparefn) { |
// In-place QuickSort algorithm. |
// For short (length <= 22) arrays, insertion sort is used for efficiency. |
- if (!IS_FUNCTION(comparefn)) { |
+ if (!IS_SPEC_FUNCTION(comparefn)) { |
comparefn = function (x, y) { |
if (x === y) return 0; |
if (%_IsSmi(x) && %_IsSmi(y)) { |
@@ -994,7 +994,7 @@ function ArrayFilter(f, receiver) { |
["Array.prototype.filter"]); |
} |
- if (!IS_FUNCTION(f)) { |
+ if (!IS_SPEC_FUNCTION(f)) { |
throw MakeTypeError('called_non_callable', [ f ]); |
} |
// Pull out the length so that modifications to the length in the |
@@ -1020,7 +1020,7 @@ function ArrayForEach(f, receiver) { |
["Array.prototype.forEach"]); |
} |
- if (!IS_FUNCTION(f)) { |
+ if (!IS_SPEC_FUNCTION(f)) { |
throw MakeTypeError('called_non_callable', [ f ]); |
} |
// Pull out the length so that modifications to the length in the |
@@ -1043,7 +1043,7 @@ function ArraySome(f, receiver) { |
["Array.prototype.some"]); |
} |
- if (!IS_FUNCTION(f)) { |
+ if (!IS_SPEC_FUNCTION(f)) { |
throw MakeTypeError('called_non_callable', [ f ]); |
} |
// Pull out the length so that modifications to the length in the |
@@ -1065,7 +1065,7 @@ function ArrayEvery(f, receiver) { |
["Array.prototype.every"]); |
} |
- if (!IS_FUNCTION(f)) { |
+ if (!IS_SPEC_FUNCTION(f)) { |
throw MakeTypeError('called_non_callable', [ f ]); |
} |
// Pull out the length so that modifications to the length in the |
@@ -1086,7 +1086,7 @@ function ArrayMap(f, receiver) { |
["Array.prototype.map"]); |
} |
- if (!IS_FUNCTION(f)) { |
+ if (!IS_SPEC_FUNCTION(f)) { |
throw MakeTypeError('called_non_callable', [ f ]); |
} |
// Pull out the length so that modifications to the length in the |
@@ -1231,7 +1231,7 @@ function ArrayReduce(callback, current) { |
["Array.prototype.reduce"]); |
} |
- if (!IS_FUNCTION(callback)) { |
+ if (!IS_SPEC_FUNCTION(callback)) { |
throw MakeTypeError('called_non_callable', [callback]); |
} |
// Pull out the length so that modifications to the length in the |
@@ -1265,7 +1265,7 @@ function ArrayReduceRight(callback, current) { |
["Array.prototype.reduceRight"]); |
} |
- if (!IS_FUNCTION(callback)) { |
+ if (!IS_SPEC_FUNCTION(callback)) { |
throw MakeTypeError('called_non_callable', [callback]); |
} |
var i = ToUint32(this.length) - 1; |