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 // Binary: cache/js-dbg-32-1fd6c40d3852-linux
2 // Flags: --ion-eager
3 //
5 function TestCase(n, d, e, a) {};
6 this.__proto__ = [];
7 var msPerDay = 86400000;
8 var TIME_1900 = -2208988800000;
9 function TimeFromYear( y ) {
10 return ( msPerDay * DayFromYear(y) );
11 }
12 function DayFromYear( y ) {
13 return ( 365*(y-1970) +
14 Math.floor((y-1601)/400) );
15 }
16 function YearFromTime( t ) {
17 var sign = ( t < 0 ) ? -1 : 1;
18 var year = ( sign < 0 ) ? 1969 : 1970;
19 return ( year );
20 }
21 var SECTION = "15.9.5.10";
22 addTestCase( TIME_1900 );
23 function addTestCase( t ) {
24 var start = TimeFromYear(YearFromTime(t));
25 var stop = TimeFromYear(YearFromTime(t) + 1);
26 for (var d = start; d < stop; d += msPerDay) {
27 new TestCase( SECTION,
28 (new Date( SECTION ? "Failed" : prototype += "'abc'.search(new RegExp('^'))") ).getDate() );
29 }
30 }