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 var g = true;
3 function getown(name)
4 {
5 if (g)
6 return { value: 8, enumerable: true, writable: false, configurable: true };
7 }
9 var p = Proxy.create( { getPropertyDescriptor: getown } );
10 var o2 = Object.create(p);
12 function test(x, expected) {
13 for (var i=0; i<3; i++) {
14 var v = x.hello;
15 if (g) assertEq(v, 8);
16 }
17 }
19 g = false
20 test(o2);
21 g = true;
22 test(o2);