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 // Try to test that we handle shape regeneration correctly.
2 // This is a fragile test, but as of this writing, on dmandelin's
3 // windows box, we have the same shape number with different
4 // logical shapes in the two assertEq lines.
6 var o;
7 var p;
8 var zz;
9 var o2;
11 function f(x) {
12 return x.a;
13 }
15 gczeal(1);
16 gc();
18 zz = { q: 11 };
19 o = { a: 77, b: 88 };
20 o2 = { c: 11 };
21 p = { b: 99, a: 11 };
23 //print('s ' + shapeOf(zz) + ' ' + shapeOf(o) + ' ' + shapeOf(o2) + ' ' + shapeOf(p));
25 assertEq(f(o), 77);
27 o = undefined;
29 gczeal(1);
30 gc();
31 //print('s ' + 'x' + ' ' + shapeOf(p));
33 assertEq(f(p), 11);