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 // Setting an onPop handler from an onPop handler doesn't throw, but the
2 // new handler doesn't fire.
3 var g = newGlobal();
4 var dbg = new Debugger(g);
5 var log;
7 dbg.onDebuggerStatement = function handleDebugger(frame) {
8 log += 'd';
9 assertEq(frame.type, "eval");
10 frame.onPop = function firstHandlePop(c) {
11 log +=')';
12 assertEq(c.return, 'on investment');
13 this.onPop = function secondHandlePop(c) {
14 assertEq("secondHandlePop was called", "secondHandlePop should never be called");
15 };
16 };
17 };
19 log = "";
20 g.eval("debugger; 'on investment';");
21 assertEq(log, 'd)');