Index: src/array.js |
diff --git a/src/array.js b/src/array.js |
index 68796dda353793be922f506869472be4cfebb572..b2e26e0305418680a84d52a19150dcfae8290ef2 100644 |
--- a/src/array.js |
+++ b/src/array.js |
@@ -1142,9 +1142,7 @@ function ArrayFilter(f, receiver) { |
var array = ToObject(this); |
var length = ToUint32(array.length); |
- if (!IS_SPEC_FUNCTION(f)) { |
- throw MakeTypeError('called_non_callable', [ f ]); |
- } |
+ if (!IS_SPEC_FUNCTION(f)) throw MakeTypeError(kCalledNonCallable, f); |
var needs_wrapper = false; |
if (IS_NULL_OR_UNDEFINED(receiver)) { |
receiver = %GetDefaultReceiver(f) || receiver; |
@@ -1181,9 +1179,7 @@ function ArrayForEach(f, receiver) { |
var array = ToObject(this); |
var length = TO_UINT32(array.length); |
- if (!IS_SPEC_FUNCTION(f)) { |
- throw MakeTypeError('called_non_callable', [ f ]); |
- } |
+ if (!IS_SPEC_FUNCTION(f)) throw MakeTypeError(kCalledNonCallable, f); |
var needs_wrapper = false; |
if (IS_NULL_OR_UNDEFINED(receiver)) { |
receiver = %GetDefaultReceiver(f) || receiver; |
@@ -1215,9 +1211,7 @@ function ArraySome(f, receiver) { |
var array = ToObject(this); |
var length = TO_UINT32(array.length); |
- if (!IS_SPEC_FUNCTION(f)) { |
- throw MakeTypeError('called_non_callable', [ f ]); |
- } |
+ if (!IS_SPEC_FUNCTION(f)) throw MakeTypeError(kCalledNonCallable, f); |
var needs_wrapper = false; |
if (IS_NULL_OR_UNDEFINED(receiver)) { |
receiver = %GetDefaultReceiver(f) || receiver; |
@@ -1248,9 +1242,7 @@ function ArrayEvery(f, receiver) { |
var array = ToObject(this); |
var length = TO_UINT32(array.length); |
- if (!IS_SPEC_FUNCTION(f)) { |
- throw MakeTypeError('called_non_callable', [ f ]); |
- } |
+ if (!IS_SPEC_FUNCTION(f)) throw MakeTypeError(kCalledNonCallable, f); |
var needs_wrapper = false; |
if (IS_NULL_OR_UNDEFINED(receiver)) { |
receiver = %GetDefaultReceiver(f) || receiver; |
@@ -1280,9 +1272,7 @@ function ArrayMap(f, receiver) { |
var array = ToObject(this); |
var length = TO_UINT32(array.length); |
- if (!IS_SPEC_FUNCTION(f)) { |
- throw MakeTypeError('called_non_callable', [ f ]); |
- } |
+ if (!IS_SPEC_FUNCTION(f)) throw MakeTypeError(kCalledNonCallable, f); |
var needs_wrapper = false; |
if (IS_NULL_OR_UNDEFINED(receiver)) { |
receiver = %GetDefaultReceiver(f) || receiver; |
@@ -1427,7 +1417,7 @@ function ArrayReduce(callback, current) { |
var length = ToUint32(array.length); |
if (!IS_SPEC_FUNCTION(callback)) { |
- throw MakeTypeError('called_non_callable', [callback]); |
+ throw MakeTypeError(kCalledNonCallable, callback); |
} |
var is_array = IS_ARRAY(array); |
@@ -1464,7 +1454,7 @@ function ArrayReduceRight(callback, current) { |
var length = ToUint32(array.length); |
if (!IS_SPEC_FUNCTION(callback)) { |
- throw MakeTypeError('called_non_callable', [callback]); |
+ throw MakeTypeError(kCalledNonCallable, callback); |
} |
var is_array = IS_ARRAY(array); |