Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 // Returning {throw:} from an onPop handler when yielding works and
2 // 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 return {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 var rv = gw.evalInGlobal("it.next();");
17 assertEq(rv.throw, "fit");
19 dbg.enabled = false;
20 assertIteratorNext(g.it, 1);