43633af0e3
[1] fixes the behavior of StaNamedOwnProperty to no longer do prototype lookups. This lets us revert [2] and go back to using the fast path in the clone spread object literal bytecode. The test case from [2] is kept. [1] https://chromium-review.googlesource.com/c/v8/v8/+/2795831 [2] https://chromium-review.googlesource.com/c/v8/v8/+/3178969 Bug: v8:9888, chromium:1251366 Change-Id: I9d2cb69b803c403f63365f55d27c4de20ff7dafb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3224666 Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Patrick Thier <pthier@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#77444}
21 lines
473 B
JavaScript
21 lines
473 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.
|
|
|
|
Object.defineProperty(Object.prototype, "x", {
|
|
set: function (val) {}
|
|
});
|
|
|
|
Object.defineProperty(Object.prototype, "0", {
|
|
set: function (val) {}
|
|
});
|
|
|
|
let o = {...{}, x: 3};
|
|
assertEquals(3, o.x);
|
|
|
|
let o2 = {...{x: 1}, x: 3};
|
|
assertEquals(3, o2.x);
|
|
|
|
let o3 = {...{}, 0: 42}
|
|
assertEquals(42, o3[0]);
|