summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Frame-eval-18.js
blob: 3cde24eb280070c7db0b718ceb106a989f140f40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// yield is not allowed in eval in a star generator.

load(libdir + 'asserts.js');

var g = newGlobal({newCompartment: true});
var dbg = new Debugger(g);

dbg.onDebuggerStatement = function (frame) {
    assertThrowsInstanceOf(function() { frame.eval('yield 10;') }, SyntaxError);
};

g.eval("(function*g(){ debugger; })()");