diff options
Diffstat (limited to 'js/src/jit-test/tests/debug/Frame-identity-02.js')
-rw-r--r-- | js/src/jit-test/tests/debug/Frame-identity-02.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/Frame-identity-02.js b/js/src/jit-test/tests/debug/Frame-identity-02.js new file mode 100644 index 000000000..207e6879e --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-identity-02.js @@ -0,0 +1,21 @@ +// Check that {throw:} resumption kills the current stack frame. + +load(libdir + "asserts.js"); + +var g = newGlobal(); +g.debuggeeGlobal = this; +g.eval("(" + function () { + var dbg = new Debugger(debuggeeGlobal); + var prev = null; + dbg.onDebuggerStatement = function (frame) { + assertEq(frame === prev, false); + if (prev) + assertEq(prev.live, false); + prev = frame; + return {throw: debuggeeGlobal.i}; + }; + } + ")();"); + +function f() { debugger; } +for (var i = 0; i < 10; i++) + assertThrowsValue(f, i); |