summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/class-07.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/debug/class-07.js')
-rw-r--r--js/src/jit-test/tests/debug/class-07.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/class-07.js b/js/src/jit-test/tests/debug/class-07.js
new file mode 100644
index 0000000000..a6a69cb79f
--- /dev/null
+++ b/js/src/jit-test/tests/debug/class-07.js
@@ -0,0 +1,21 @@
+// |jit-test| error: ReferenceError
+
+let g = newGlobal({newCompartment: true});
+let dbg = Debugger(g);
+
+let forceException = g.eval(`
+ (class extends class {} {
+ // Calling this will return a primitive immediately.
+ constructor() { return {}; }
+ })
+`);
+
+dbg.onEnterFrame = function() {
+ return {
+ // Force the return undefined, which will throw for returning
+ // while |this| is still undefined.
+ return: undefined
+ }
+}
+print("break here");
+new forceException;