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 identity
3 load(libdir + "jitopts.js");
5 if (!jitTogglesMatch(Opts_Ion2NoParallelCompilation))
6 quit();
8 withJitOptions(Opts_Ion2NoParallelCompilation, function () {
9 var g = newGlobal();
10 var dbg1 = new Debugger;
11 var dbg2 = new Debugger;
13 g.toggle = function toggle(x, d) {
14 if (d) {
15 dbg1.addDebuggee(g);
16 dbg2.addDebuggee(g);
17 var frame1 = dbg1.getNewestFrame();
18 assertEq(frame1.environment.getVariable("x"), x);
19 assertEq(frame1.implementation, "ion");
20 frame1.environment.setVariable("x", "not 42");
21 assertEq(dbg2.getNewestFrame().environment.getVariable("x"), "not 42");
22 }
23 };
25 g.eval("" + function f(x, d) { toggle(x, d); });
27 g.eval("(" + function test() {
28 for (var i = 0; i < 5; i++)
29 f(42, false);
30 f(42, true);
31 } + ")();");
32 });