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 // getprop, proto and self, 3 shapes
3 var expected = "22,202,99;202,99,22;99,22,202;22,202,99;202,99,22;99,22,202;22,202,99;202,99,22;99,22,202;";
4 var actual = '';
6 var protoB = { a: 11, b: 22, c: 33 };
8 function B() {
9 }
10 B.prototype = protoB;
12 var protoC = { a: 101, b: 202, c: 303 };
14 function C() {
15 }
16 C.prototype = protoC;
18 function f() {
19 var o1 = new B();
20 var o2 = new C();
21 var o3 = new C();
22 o3.b = 99;
23 var oa = [ o1, o2, o3 ];
25 for (var i = 0; i < 9; ++i) {
26 // Use 3 PICs so we start out with each type in one PIC.
27 var i1 = i % 3;
28 var i2 = (i+1) % 3;
29 var i3 = (i+2) % 3;
31 actual += oa[i1].b + ',';
32 actual += oa[i2].b + ',';
33 actual += oa[i3].b + ';';
34 }
35 }
37 f();
39 assertEq(actual, expected);