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.
2 /* Test pop/shift compiler paths. */
4 function a() {
5 var x = [];
6 for (var i = 0; i < 50; i++)
7 x.push(i);
8 for (var j = 0; j < 100; j++) {
9 var z = x.shift();
10 if (j < 50)
11 assertEq(z, j);
12 else
13 assertEq(z, undefined);
14 }
15 }
16 a();
18 function b() {
19 var x = [];
20 for (var i = 0; i < 50; i++)
21 x.push(i);
22 for (var j = 0; j < 100; j++) {
23 var z = x.pop();
24 if (j < 50)
25 assertEq(z, 49 - j);
26 else
27 assertEq(z, undefined);
28 }
29 }
30 b();