Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 // Throwing an exception from an onPop handler when yielding terminates the debuggee
2 // but does not close the generator-iterator.
4 load(libdir + 'iteration.js')
6 var g = newGlobal();
7 var dbg = new Debugger;
8 var gw = dbg.addDebuggee(g);
9 dbg.onDebuggerStatement = function handleDebugger(frame) {
10 frame.onPop = function (c) {
11 throw "fit";
12 };
13 };
14 g.eval("function* g() { for (var i = 0; i < 10; i++) { debugger; yield i; } }");
15 g.eval("var it = g();");
16 assertEq(gw.evalInGlobal("it.next();"), null);
18 dbg.enabled = false;
19 assertIteratorNext(g.it, 1);