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 twice from the same stack frame, the same
2 // Debugger.Frame object is passed to the hook both times.
4 var g = newGlobal();
5 var hits, frame;
6 var dbg = Debugger(g);
7 dbg.onDebuggerStatement = function (f) {
8 if (hits++ == 0)
9 frame = f;
10 else
11 assertEq(f, frame);
12 };
14 hits = 0;
15 g.evaluate("debugger; debugger;");
16 assertEq(hits, 2);
18 hits = 0;
19 g.evaluate("function f() { debugger; debugger; } f();");
20 assertEq(hits, 2);
22 hits = 0;
23 g.evaluate("eval('debugger; debugger;');");
24 assertEq(hits, 2);