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.
michael@0 | 1 | |
michael@0 | 2 | var x = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 3 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 4 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 5 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 6 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 7 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 8 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 9 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 10 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 11 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 12 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 13 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 14 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 15 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 16 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 17 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 18 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 19 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 20 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 21 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 22 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 23 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 24 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 25 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 26 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), |
michael@0 | 27 | ]; |
michael@0 | 28 | assertEq(x.length, 500); |
michael@0 | 29 | assertEq(x[10], 11); |
michael@0 | 30 | assertEq(x[90], 11); |
michael@0 | 31 | |
michael@0 | 32 | function stringify(a) { |
michael@0 | 33 | var b = ""; |
michael@0 | 34 | for (var c in a) { b += c + ","; } |
michael@0 | 35 | return b; |
michael@0 | 36 | } |
michael@0 | 37 | |
michael@0 | 38 | var y = {a:1,b:2,c:3,d:4,e:gc(),f:6,g:7,h:8,i:9,j:gc(), |
michael@0 | 39 | k:11,l:12,m:13,n:14,o:gc(),p:16,q:17,r:18,s:19,t:gc()}; |
michael@0 | 40 | |
michael@0 | 41 | assertEq(stringify(y), "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,"); |