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 // Test for one annoying case of the EliminateUnreachableCode
2 // optimization. Here the dominator of print("Goodbye") changes to be
3 // the print("Hello") after optimization.
5 function test1(v) {
6 if (v) {
7 if (v) {
8 assertEq(v, v);
9 } else {
10 assertEq(0, 1);
11 }
12 } else {
13 if (v) {
14 assertEq(0, 1);
15 } else {
16 assertEq(v, v);
17 }
18 }
19 assertEq(v, v);
20 }
22 function test() {
23 test1(true);
24 test1(false);
25 }
27 for (var i = 0; i < 100; i++)
28 test();