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 var foo;
3 function gen() {
4 var x = 0;
5 foo = function() { return x++; }
6 for (var i = 0; i < 10; ++i)
7 yield x++;
8 }
10 var j = 0;
11 for (i in gen())
12 assertEq(i, j++);
14 // now mess up the stack
16 function f1(x) {
17 var a, b, c, d, e, f, g;
18 return x <= 0 ? 0 : f1(x-1);
19 }
20 f1(10);
21 function f2(x) {
22 var a = x, b = x;
23 return x <= 0 ? 0 : f2(x-1);
24 }
25 f2(10);
27 // now observe gen's call object (which should have been put)
29 gc();
30 assertEq(foo(), 10);
31 gc();
32 assertEq(foo(), 11);
33 gc();
34 assertEq(foo(), 12);
36 reportCompare(true,true);