summaryrefslogtreecommitdiffstats
path: root/src/array.js
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-11-05 08:53:23 +0000
committerSteve Block <steveblock@google.com>2009-11-05 08:53:23 +0000
commit3ce2e2076e8e3e60cf1810eec160ea2d8557e9e7 (patch)
tree5f5d61c95b42f8e38a8a0c22cb7ad0506984d725 /src/array.js
parenta7e24c173cf37484693b9abb38e494fa7bd7baeb (diff)
downloadandroid_external_v8-3ce2e2076e8e3e60cf1810eec160ea2d8557e9e7.tar.gz
android_external_v8-3ce2e2076e8e3e60cf1810eec160ea2d8557e9e7.tar.bz2
android_external_v8-3ce2e2076e8e3e60cf1810eec160ea2d8557e9e7.zip
Update V8 to r3121 as required for WebKit update.
Change-Id: Ic53e0aef9a9eb9b71ee7d25a8aef61520bba899c
Diffstat (limited to 'src/array.js')
-rw-r--r--src/array.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/array.js b/src/array.js
index f8e63d08..94d74a50 100644
--- a/src/array.js
+++ b/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({