| Index: src/runtime/runtime-typedarray.cc
|
| diff --git a/src/runtime/runtime-typedarray.cc b/src/runtime/runtime-typedarray.cc
|
| index eeaa40e5ea648df51d7f5583df55ce5ea63d8ebe..afebda25a520f544709f9c6fc5e02120ca6d1554 100644
|
| --- a/src/runtime/runtime-typedarray.cc
|
| +++ b/src/runtime/runtime-typedarray.cc
|
| @@ -177,9 +177,8 @@ RUNTIME_FUNCTION(Runtime_TypedArraySortFast) {
|
| CONVERT_ARG_HANDLE_CHECKED(Object, target_obj, 0);
|
|
|
| Handle<JSTypedArray> array;
|
| - const char* method = "%TypedArray%.prototype.sort";
|
| ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
| - isolate, array, JSTypedArray::Validate(isolate, target_obj, method));
|
| + isolate, array, JSTypedArray::Validate(isolate, target_obj));
|
|
|
| // This line can be removed when JSTypedArray::Validate throws
|
| // if array.[[ViewedArrayBuffer]] is neutered(v8:4648)
|
| @@ -260,5 +259,20 @@ RUNTIME_FUNCTION(Runtime_IsSharedInteger32TypedArray) {
|
| obj->type() == kExternalInt32Array);
|
| }
|
|
|
| +RUNTIME_FUNCTION(Runtime_TypedArraySpeciesCreateByLength) {
|
| + HandleScope scope(isolate);
|
| + DCHECK(args.length() == 2);
|
| + Handle<JSTypedArray> exemplar = args.at<JSTypedArray>(1);
|
| + Handle<Object> length = args.at(2);
|
| + int argc = 1;
|
| + ScopedVector<Handle<Object>> argv(argc);
|
| + argv[0] = length;
|
| + Handle<JSTypedArray> result_array;
|
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
| + isolate, result_array,
|
| + JSTypedArray::SpeciesCreate(isolate, exemplar, argc, argv.start()));
|
| + return *result_array;
|
| +}
|
| +
|
| } // namespace internal
|
| } // namespace v8
|
|
|