blob: 20bee8d35aaec6767b57f148c6a06cbde65e1521 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Bug 1556033. Test behavior of onEnterFrame "return" completion
// values during explicit .return() calls.
let g = newGlobal({newCompartment: true});
g.eval(`function* f(x) { }`);
let dbg = new Debugger(g);
let it = g.f();
dbg.onEnterFrame = () => ({ return: "exit" });
const result = it.return();
assertEq(result.value, "exit");
assertEq(result.done, true);
const result2 = it.next();
assertEq(result2.value, undefined);
assertEq(result2.done, true);
|