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