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 f_localinc(x) {
2 var a = x;
3 var b = a++;
5 var c = b+b+b+b+b+b+b+b+b+b;
6 return a + c;
7 }
8 assertEq(f_localinc(1), 12)
9 function f_localdec(x) {
10 var a = x;
11 var b = a--;
13 var c = b+b+b+b+b+b+b+b+b+b;
14 return a + c;
15 }
16 assertEq(f_localdec(1), 10)
17 function f_inclocal(x) {
18 var a = x;
19 var b = ++a;
21 var c = b+b+b+b+b+b+b+b+b+b;
22 return a + c;
23 }
24 assertEq(f_inclocal(1), 22)
25 function f_declocal(x) {
26 var a = x;
27 var b = --a;
29 var c = b+b+b+b+b+b+b+b+b+b;
30 return a + c;
31 }
32 assertEq(f_declocal(1), 0)