| Index: src/runtime/runtime-array.cc
|
| diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc
|
| index ab436c2237ddef39a779ac04f94934c1bb739204..8315bfbc88ca781b7a22af4303764feb24d4a36e 100644
|
| --- a/src/runtime/runtime-array.cc
|
| +++ b/src/runtime/runtime-array.cc
|
| @@ -455,6 +455,15 @@ RUNTIME_FUNCTION(Runtime_HasComplexElements) {
|
| return isolate->heap()->false_value();
|
| }
|
|
|
| +// ES6 22.1.2.2 Array.isArray
|
| +RUNTIME_FUNCTION(Runtime_ArrayIsArray) {
|
| + HandleScope shs(isolate);
|
| + DCHECK(args.length() == 1);
|
| + CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
|
| + Maybe<bool> result = Object::IsArray(object);
|
| + MAYBE_RETURN(result, isolate->heap()->exception());
|
| + return isolate->heap()->ToBoolean(result.FromJust());
|
| +}
|
|
|
| RUNTIME_FUNCTION(Runtime_IsArray) {
|
| SealHandleScope shs(isolate);
|
| @@ -463,7 +472,6 @@ RUNTIME_FUNCTION(Runtime_IsArray) {
|
| return isolate->heap()->ToBoolean(obj->IsJSArray());
|
| }
|
|
|
| -
|
| RUNTIME_FUNCTION(Runtime_HasCachedArrayIndex) {
|
| SealHandleScope shs(isolate);
|
| DCHECK(args.length() == 1);
|
|
|