655ae222dd
Also fixes existing tests which were asserting the wrong behavior (that setting writable=false won't have an effect). The bug was introduced by https://chromium-review.googlesource.com/c/v8/v8/+/1442640 . Bug: chromium:1158138 Change-Id: I2d85721848eb4e7d530a980a9ecef7f8693bb9a2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2691050 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#72948}
12 lines
421 B
JavaScript
12 lines
421 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.
|
|
|
|
// Flags: --allow-natives-syntax
|
|
|
|
let a = { foo: 4 };
|
|
Object.seal(a);
|
|
assertTrue(Object.getOwnPropertyDescriptor(a, 'foo').writable);
|
|
Object.defineProperty(a, 'foo', { writable: false });
|
|
assertFalse(Object.getOwnPropertyDescriptor(a, 'foo').writable);
|