Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index ba6eec3306b1d7cb8e022b4d8378d8f69e175579..c48fb80bfa53705914037b4a2c8aa72de9bda720 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -1423,6 +1423,17 @@ BUILTIN(ArrayConcat) { |
} |
+// ES6 section 22.1.2.2 Array.isArray |
+BUILTIN(ArrayIsArray) { |
+ HandleScope scope(isolate); |
+ DCHECK_EQ(2, args.length()); |
+ Handle<Object> object = args.at<Object>(1); |
+ Maybe<bool> result = Object::IsArray(object); |
+ MAYBE_RETURN(result, isolate->heap()->exception()); |
+ return *isolate->factory()->ToBoolean(result.FromJust()); |
+} |
+ |
+ |
// ES6 section 26.1.3 Reflect.defineProperty |
BUILTIN(ReflectDefineProperty) { |
HandleScope scope(isolate); |