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 func1() { return "123" }
2 function func2(a,b,c,d,e) { return "123" }
3 var imp = { func1:func1, func2:func2 };
5 function FFI1(stdlib, foreign) {
6 "use asm";
8 var func1 = foreign.func1;
9 var func2 = foreign.func2;
11 function g() {
12 return func1()|0
13 }
15 function h() {
16 return func2()|0
17 }
19 return {g:g, h:h};
20 }
22 var f = FFI1(this, imp); // produces AOT-compiled version
24 assertEq(f.g(), 123);
25 assertEq(f.g(), 123);
27 assertEq(f.h(), 123);
28 assertEq(f.h(), 123);