Commit 7d533b6a authored by Choongwoo Han's avatar Choongwoo Han Committed by Commit Bot

[typedarrays] Remove checking detached buffer

Remove checking detached buffer of a validated typed array in
%TypedArray%.prototype.slice. Now, JSTypedArray::Validate checks
if the new typed array's buffer is detached or not.

Bug: v8:5929
Change-Id: I381e33e3995ae10cc2907a7141a64ec9f97c742f
Reviewed-on: https://chromium-review.googlesource.com/721399Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48818}
parent 80442c0c
......@@ -568,12 +568,6 @@ BUILTIN(TypedArrayPrototypeSlice) {
isolate, result_array,
TypedArraySpeciesCreateByLength(isolate, array, method, count));
// TODO(cwhan.tunz): neutering check of the result_array should be done in
// TypedArraySpeciesCreate, but currently ValidateTypedArray does not throw
// for neutered buffer, so this is a temporary neutering check for the result
// array
if (V8_UNLIKELY(result_array->WasNeutered())) return *result_array;
// TODO(cwhan.tunz): should throw.
if (V8_UNLIKELY(array->WasNeutered())) return *result_array;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment