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.
2 var C1 = 1;
3 var C2 = 2;
4 const C3 = 3;
6 function f(x) {
7 var s = "";
9 switch(x) {
10 case C1:
11 s += "1";
12 case C2:
13 s += "2";
14 break;
15 case C3:
16 s += "3";
17 default:
18 s += "d";
19 case 4:
20 s += "4";
21 }
22 return s;
23 }
24 assertEq(f(1), "12");
25 assertEq(f(2), "2");
26 assertEq(f(3), "3d4");
27 assertEq(f(4), "4");
29 assertEq(f(0), "d4");
30 assertEq(f(-0), "d4");
32 assertEq(f(true), "d4");