diff options
Diffstat (limited to 'deps/v8/src/array.js')
-rw-r--r-- | deps/v8/src/array.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/deps/v8/src/array.js b/deps/v8/src/array.js index f8e63d084..94d74a508 100644 --- a/deps/v8/src/array.js +++ b/deps/v8/src/array.js @@ -1058,6 +1058,10 @@ function ArrayReduceRight(callback, current) { return current; } +// ES5, 15.4.3.2 +function ArrayIsArray(obj) { + return IS_ARRAY(obj); +} // ------------------------------------------------------------------- @@ -1075,6 +1079,11 @@ function SetupArray() { // object. %SetProperty($Array.prototype, "constructor", $Array, DONT_ENUM); + // Setup non-enumerable functions on the Array object. + InstallFunctions($Array, DONT_ENUM, $Array( + "isArray", ArrayIsArray + )); + // Setup non-enumerable functions of the Array.prototype object and // set their names. InstallFunctionsOnHiddenPrototype($Array.prototype, DONT_ENUM, $Array( @@ -1098,8 +1107,9 @@ function SetupArray() { "indexOf", ArrayIndexOf, "lastIndexOf", ArrayLastIndexOf, "reduce", ArrayReduce, - "reduceRight", ArrayReduceRight)); - + "reduceRight", ArrayReduceRight + )); + // Manipulate the length of some of the functions to meet // expectations set by ECMA-262 or Mozilla. UpdateFunctionLengths({ |