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 f(v, value)
2 {
3 var b = v !== undefined;
4 assertEq(b, value,
5 "failed: " + v + " " + value);
6 }
8 f({}, true);
9 f({}, true);
10 f(null, true);
11 f(null, true);
12 f(undefined, false);
13 f(undefined, false);
14 f(objectEmulatingUndefined(), true);
15 f(objectEmulatingUndefined(), true);
16 f(Object.prototype, true);
17 f(Object.prototype, true);
19 function g(v, value)
20 {
21 var b = v !== undefined;
22 assertEq(b, value,
23 "failed: " + v + " " + value);
24 }
26 g({}, true);
27 g({}, true);
29 function h(v, value)
30 {
31 var b = v !== undefined;
32 assertEq(b, value,
33 "failed: " + v + " " + value);
34 }
36 h(objectEmulatingUndefined(), true);
37 h(objectEmulatingUndefined(), true);