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 TestCase(n, d, e, a)
2 function writeHeaderToLog( string ) {}
3 var SECTION = "15.1.2.5-2";
4 for ( var CHARCODE = 0; CHARCODE < 256; CHARCODE += 16 ) {
5 new TestCase( SECTION, unescape( "%" + (ToHexString(CHARCODE)).substring(0,1) ) );
6 }
7 function ToHexString( n ) {
8 var hex = new Array();
9 for ( var mag = 1; Math.pow(16,mag) <= n ; mag++ ) { }
10 for ( index = 0, mag -= 1; mag > 0; index++, mag-- ) { }
11 var string ="";
12 switch ( hex[index] ) {
13 case 10:
14 string += "A";
15 }
16 return string;
17 }