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 var a;
2 function setelem()
3 {
4 a = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
5 a = a.concat(a, a, a);
6 var l = a.length;
7 for (var i = 0; i < l; i++) {
8 a[i] = i;
9 }
10 return a.toString();
11 }
13 setelem();
15 function getelem_inner(a)
16 {
17 var accum = 0;
18 var l = a.length;
19 for (var i = 0; i < l; i++) {
20 accum += a[i];
21 }
22 return accum;
23 }
25 function getelem()
26 {
27 return getelem_inner(a);
28 }
30 assertEq(getelem(), 3486);