summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Frame-eval-04.js
blob: 83ec7945ebd6e38c8e36651c9d09dc7df00f6181 (plain)
1
2
3
4
5
6
7
8
9
10
11
// frame.eval SyntaxErrors are reflected, not thrown

var g = newGlobal({newCompartment: true});
var dbg = new Debugger(g);
var exc, SEp;
dbg.onDebuggerStatement = function (frame) {
    exc = frame.eval("#$@!").throw;
    SEp = frame.eval("SyntaxError.prototype").return;
};
g.eval("debugger;");
assertEq(exc.proto, SEp);