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 function loopWithUndefined2(t, dostuff, val) {
2 var a = new Array(6);
3 for (var i = 0; i < 6; i++) {
4 if (dostuff) {
5 val = 1;
6 a[i] = (t > val);
7 } else {
8 a[i] = (val == undefined);
9 }
10 }
11 return a;
12 }
13 function testLoopWithUndefined2() {
14 var a = loopWithUndefined2(5.0, true, 2);
15 var b = loopWithUndefined2(5.0, true);
16 var c = loopWithUndefined2(5.0, false, 8);
17 var d = loopWithUndefined2(5.0, false);
18 return [a[0], b[0], c[0], d[0]].join(",");
19 }
20 assertEq(testLoopWithUndefined2(), "true,true,false,true");