summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/regress/regress-crbug-1002628.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/regress/regress-crbug-1002628.js')
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-1002628.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-1002628.js b/deps/v8/test/mjsunit/regress/regress-crbug-1002628.js
new file mode 100644
index 0000000000..8be7e8687d
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-1002628.js
@@ -0,0 +1,22 @@
+// 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: --always-opt
+
+"use strict";
+var __v_0 = {};
+try {
+ __v_0 = this;
+ Object.freeze(__v_0);
+}
+catch (e) {
+}
+
+function f() {
+ x = { [Symbol.toPrimitive]: () => FAIL };
+}
+try {
+ f()
+} catch (e) { }
+assertThrows(() => f(), ReferenceError);