summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/regress-930045.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/regress-930045.js')
-rw-r--r--deps/v8/test/mjsunit/regress-930045.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/regress-930045.js b/deps/v8/test/mjsunit/regress-930045.js
new file mode 100644
index 0000000000..8983c2014a
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress-930045.js
@@ -0,0 +1,35 @@
+// 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() {
+ var o = {};
+ Object.preventExtensions(o);
+
+ try { Error.captureStackTrace(o); } catch (e) {}
+ try { Error.captureStackTrace(o); } catch (e) {}
+})();
+
+(function PrivateFieldAfterPreventExtensions() {
+ class C {
+ constructor() {
+ this.x = 1;
+ Object.preventExtensions(this);
+ }
+ }
+
+ class D extends C {
+ #i = 42;
+
+ set(i) { this.#i = i; }
+ get(i) { return this.#i; }
+ }
+
+ let d = new D();
+ d.x = 0.1;
+ assertEquals(42, d.get());
+ d.set(43);
+ assertEquals(43, d.get());
+})();