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 // Eval-in-frame with different type on baseline frame with let-scoping
3 load(libdir + "jitopts.js");
5 if (!jitTogglesMatch(Opts_BaselineEager))
6 quit(0);
8 withJitOptions(Opts_BaselineEager, function () {
9 var g = newGlobal();
10 var dbg = new Debugger;
12 g.h = function h(d) {
13 if (d) {
14 dbg.addDebuggee(g);
15 var f = dbg.getNewestFrame().older;
16 assertEq(f.implementation, "baseline");
17 assertEq(f.environment.getVariable("foo"), 42);
18 f.eval("foo = 'string of 42'");
19 }
20 }
22 g.eval("" + function f(d) {
23 if (d) {
24 let foo = 42;
25 g(d);
26 return foo;
27 }
28 });
30 g.eval("" + function g(d) { h(d); });
32 g.eval("(" + function () { assertEq(f(true), "string of 42"); } + ")();");
33 });