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 // When the debugger is triggered from different stack frames that happen to
2 // occupy the same memory, it delivers different Debugger.Frame objects.
4 var g = newGlobal();
5 var dbg = Debugger(g);
6 var hits;
7 var a = [];
8 dbg.onDebuggerStatement = function (frame) {
9 for (var i = 0; i < a.length; i++)
10 assertEq(a[i] === frame, false);
11 a.push(frame);
12 hits++;
13 };
15 g.eval("function f() { debugger; }");
16 g.eval("function h() { debugger; f(); }");
17 hits = 0;
18 g.eval("for (var i = 0; i < 4; i++) h();");
19 assertEq(hits, 8);