diff options
Diffstat (limited to 'js/src/jit-test/tests/debug/class-07.js')
-rw-r--r-- | js/src/jit-test/tests/debug/class-07.js | 21 |
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 000000000..8613e737b --- /dev/null +++ b/js/src/jit-test/tests/debug/class-07.js @@ -0,0 +1,21 @@ +// |jit-test| error: ReferenceError + +let g = newGlobal(); +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; |