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 testUniqueness(asmJSModule) {
2 var f = asmJSModule();
3 var g = asmJSModule();
4 assertEq(f === g, false);
5 f.x = 4;
6 assertEq(f.x, 4);
7 assertEq(g.x, undefined);
8 }
10 function deffun() {
11 if (Math.sin) {
12 function inner() { "use asm"; function g() {} return g }
13 }
14 return inner;
15 }
17 testUniqueness(deffun);
19 function lambda() {
20 var x = function inner() { "use asm"; function g() {} return g };
21 return x;
22 }
24 testUniqueness(lambda);
26 function inEval() {
27 eval("function inner() { 'use asm'; function g() {} return g }");
28 return inner;
29 }
31 testUniqueness(inEval);
33 function inWith() {
34 with ({}) {
35 function inner() { "use asm"; function g() {} return g }
36 }
37 return inner;
38 }
40 testUniqueness(inWith);