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 // Debugger.Frame preserves Ion frame mutations after removing debuggee.
3 load(libdir + "jitopts.js");
5 if (!jitTogglesMatch(Opts_Ion2NoParallelCompilation))
6 quit();
8 withJitOptions(Opts_Ion2NoParallelCompilation, function () {
9 var g = newGlobal();
10 var dbg = new Debugger;
12 g.toggle = function toggle(x, d) {
13 if (d) {
14 dbg.addDebuggee(g);
15 var frame = dbg.getNewestFrame().older;
16 assertEq(frame.callee.name, "f");
17 assertEq(frame.environment.getVariable("x"), x);
18 assertEq(frame.implementation, "ion");
19 frame.environment.setVariable("x", "not 42");
20 dbg.removeDebuggee(g);
21 }
22 };
24 g.eval("" + function f(x, d) {
25 g(x, d);
26 if (d)
27 assertEq(x, "not 42");
28 });
30 g.eval("" + function g(x, d) { toggle(x, d); });
32 g.eval("(" + function test() {
33 for (var i = 0; i < 5; i++)
34 f(42, false);
35 f(42, true);
36 } + ")();");
37 });