js/src/jit-test/tests/auto-regress/bug687125.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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 // Binary: cache/js-dbg-64-f3f5d8a8a473-linux
michael@0 2 // Flags: -m -n
michael@0 3 //
michael@0 4
michael@0 5 function MakeDay( year, month, date ) {
michael@0 6 date = ToInteger(date );
michael@0 7 var t = ( year < 1970 ) ? 1 : 0;
michael@0 8 return ( (Math.floor(t/86400000)) + date - 1 );
michael@0 9 }
michael@0 10 function MakeDate( day, time ) {
michael@0 11 if ( day == Number.POSITIVE_INFINITY || day == Number.NEGATIVE_INFINITY ) { }
michael@0 12 }
michael@0 13 function ToInteger( t ) {
michael@0 14 var sign = ( t < 0 ) ? -1 : 1;
michael@0 15 return ( sign * Math.floor( Math.abs( t ) ) );
michael@0 16 }
michael@0 17 var UTCDate = MyDateFromTime( Number("946684800000") );
michael@0 18 function MyDate() {
michael@0 19 this.date = 0;
michael@0 20 }
michael@0 21 function MyDateFromTime( t ) {
michael@0 22 var d = new MyDate();
michael@0 23 d.value = ToInteger( MakeDate( MakeDay( d.year, d.month, d.date ), d.time ) );
michael@0 24 var i = 0; while (Uint32Array && i < 10000) { ++i; if (0 == 100000) return; }
michael@0 25 }

mercurial