summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Frame-eval-18.js
blob: 5dc645fc493e8bea080acfa7bde0c60dac5e7f9f (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();
var dbg = new Debugger(g);

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

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