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 | // |jit-test| valgrind |
michael@0 | 2 | |
michael@0 | 3 | /* Test the proper operation of the left shift operator. This is especially |
michael@0 | 4 | * important on ARM as an explicit mask is required at the native instruction |
michael@0 | 5 | * level. */ |
michael@0 | 6 | |
michael@0 | 7 | load(libdir + 'range.js'); |
michael@0 | 8 | |
michael@0 | 9 | function testShiftLeft() |
michael@0 | 10 | { |
michael@0 | 11 | var r = []; |
michael@0 | 12 | var i = 0; |
michael@0 | 13 | var j = 0; |
michael@0 | 14 | |
michael@0 | 15 | var shifts = [0,1,7,8,15,16,23,24,31]; |
michael@0 | 16 | |
michael@0 | 17 | /* Samples from the simple shift range. */ |
michael@0 | 18 | for (i = 0; i < shifts.length; i++) |
michael@0 | 19 | r[j++] = 1 << shifts[i]; |
michael@0 | 20 | |
michael@0 | 21 | /* Samples outside the normal shift range. */ |
michael@0 | 22 | for (i = 0; i < shifts.length; i++) |
michael@0 | 23 | r[j++] = 1 << (shifts[i] + 32); |
michael@0 | 24 | |
michael@0 | 25 | /* Samples far outside the normal shift range. */ |
michael@0 | 26 | for (i = 0; i < shifts.length; i++) |
michael@0 | 27 | r[j++] = 1 << (shifts[i] + 224); |
michael@0 | 28 | for (i = 0; i < shifts.length; i++) |
michael@0 | 29 | r[j++] = 1 << (shifts[i] + 256); |
michael@0 | 30 | |
michael@0 | 31 | return r.join(","); |
michael@0 | 32 | } |
michael@0 | 33 | |
michael@0 | 34 | assertEq(testShiftLeft(), |
michael@0 | 35 | "1,2,128,256,32768,65536,8388608,16777216,-2147483648,"+ |
michael@0 | 36 | "1,2,128,256,32768,65536,8388608,16777216,-2147483648,"+ |
michael@0 | 37 | "1,2,128,256,32768,65536,8388608,16777216,-2147483648,"+ |
michael@0 | 38 | "1,2,128,256,32768,65536,8388608,16777216,-2147483648"); |