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 var g = newGlobal();
2 var dbg = new Debugger(g);
3 g.debuggerGlobal = this;
4 var log;
6 dbg.onEnterFrame = function handleEnter(f) {
7 log += '(';
8 f.onPop = function handlePop(c) {
9 log += ')';
10 assertEq(c.throw, "election");
11 };
12 };
13 dbg.onExceptionUnwind = function handleExceptionUnwind(f, x) {
14 log += 'u';
15 assertEq(x, "election");
16 };
18 log = '';
19 try {
20 g.eval("try { throw 'election'; } finally { debuggerGlobal.log += 'f'; }");
21 } catch (x) {
22 log += 'c';
23 assertEq(x, 'election');
24 }
25 assertEq(log, '(ufu)c');