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;
3 var gw = dbg.addDebuggee(g);
4 var log;
5 var a = [];
7 dbg.onDebuggerStatement = function (frame) {
8 log += 'd';
9 frame.onStep = function () {
10 // This handler must not wipe out the debuggee's value in JSContext::iterValue.
11 log += 's';
12 // This will use JSContext::iterValue in the debugger.
13 for (let i of a)
14 log += 'i';
15 };
16 };
18 log = '';
19 g.eval("debugger; for (let i of [1,2,3]) print(i);");
20 assertEq(!!log.match(/^ds*$/), true);