Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Unified Diff: src/runtime/runtime-array.cc

Issue 1560763002: Add Array support for @@species and subclassing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Last couple comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/harmony/array-species.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-array.cc
diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc
index a24345ec33ee39bbd9753618a711e6108fed4a7b..28e92cbd2baa0b8e977609dec2ec14733c6090a2 100644
--- a/src/runtime/runtime-array.cc
+++ b/src/runtime/runtime-array.cc
@@ -487,5 +487,18 @@ RUNTIME_FUNCTION(Runtime_FastOneByteArrayJoin) {
// to a slow path.
return isolate->heap()->undefined_value();
}
+
+
+RUNTIME_FUNCTION(Runtime_ArraySpeciesConstructor) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 1);
+ CONVERT_ARG_HANDLE_CHECKED(Object, original_array, 0);
+ Handle<Object> constructor;
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, constructor,
+ Object::ArraySpeciesConstructor(isolate, original_array));
+ return *constructor;
+}
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/harmony/array-species.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698