Commit 04af85c6 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[typed-array] Fix CopyElements.

An oversight in my previous change (3b64764b) could
cause a CHECK failure.

Bug: chromium:904707
Change-Id: Ie5f1c500bddc00741b889f78ae9ecd9af581ba5c
Reviewed-on: https://chromium-review.googlesource.com/c/1333409Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57459}
parent 7c35c03b
......@@ -3476,7 +3476,8 @@ class TypedElementsAccessor
}
// If we have to copy more elements than we have in the source, we need to
// do special handling and conversion; that happens in the slow case.
if (length + offset <= source_ta->length_value()) {
if (!source_ta->WasNeutered() &&
length + offset <= source_ta->length_value()) {
CopyElementsFromTypedArray(*source_ta, *destination_ta, length, offset);
return *isolate->factory()->undefined_value();
}
......
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
delete Float64Array.prototype.__proto__[Symbol.iterator];
let a = new Float64Array(9);
Object.defineProperty(a, "length", {
get: function () { %ArrayBufferNeuter(a.buffer); return 6; }
});
Float64Array.from(a);
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