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.
2 var buf = new ArrayBuffer(4096);
3 var f64 = new Float64Array(buf);
4 var i32 = new Int32Array(buf);
5 var u32 = new Uint32Array(buf);
7 function ffi(d) {
8 str = String(d);
9 }
12 function FFI1(glob, imp, b) {
13 "use asm";
15 var i8=new glob.Int8Array(b);var u8=new glob.Uint8Array(b);
16 var i16=new glob.Int16Array(b);var u16=new glob.Uint16Array(b);
17 var i32=new glob.Int32Array(b);var u32=new glob.Uint32Array(b);
18 var f32=new glob.Float32Array(b);var f64=new glob.Float64Array(b);
20 var ffi=imp.ffi;
22 function g() {
23 ffi(+f64[0])
24 }
25 return g
26 }
28 g = FFI1(this, {ffi:ffi}, buf);
31 // that sounds dangerous!
32 var a = [0,1,0xffff0000,0x7fff0000,0xfff80000,0x7ff80000,0xfffc0000,0x7ffc0000,0xffffffff,0x0000ffff,0x00008fff7];
33 for (i of a) {
34 for (j of a) {
35 u32[0] = i;
36 u32[1] = j;
38 print(f64[0]+" (input)");
39 //assertEq(f(), f64[0]);
41 g();
42 assertEq(str, String(f64[0]));
43 }
44 }