| // Copyright 2019 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: --harmony-private-fields |
| (function CaptureStackTracePrivateSymbol() { |
| Object.preventExtensions(o); |
| try { Error.captureStackTrace(o); } catch (e) {} |
| try { Error.captureStackTrace(o); } catch (e) {} |
| (function PrivateFieldAfterPreventExtensions() { |
| Object.preventExtensions(this); |
| get(i) { return this.#i; } |
| assertEquals(42, d.get()); |
| assertEquals(43, d.get()); |