v8/test/mjsunit/regress/regress-crbug-1227476.js
Igor Sheludko 23ec9707fa [runtime] Follow-up fix in Object.defineProperties
... which didn't properly handle negative Smi indices with
JSTypedArray receivers.

The logic was broken by the spec violation fix
https://chromium-review.googlesource.com/c/v8/v8/+/2972727

Bug: chromium:1227476, chromium:1209405
Change-Id: I9bfa57d56bebccad00ed29666489f2003694e0a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086472
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76217}
2021-08-11 07:25:23 +00:00

10 lines
292 B
JavaScript

// Copyright 2021 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.
assertThrows(
() => {
let ar = new Int32Array();
ar.__defineGetter__(-2, function() {});
}, TypeError);