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 optimized RetSub stubs.
2 var count = 0;
3 function f(x) {
4 try {
5 if (x < 0)
6 throw "negative";
7 if (x & 1)
8 return "odd";
9 count++;
10 } finally {
11 count += 3;
12 }
14 return "even";
15 }
16 for (var i=0; i<15; i++) {
17 var res = f(i);
18 if ((i % 2) === 0)
19 assertEq(res, "even");
20 else
21 assertEq(res, "odd");
22 }
23 try {
24 f(-1);
25 assertEq(0, 1);
26 } catch(e) {
27 assertEq(e, "negative");
28 }
30 assertEq(count, 56);