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 // Same thing but it needs to reconstruct multiple stack frames (so,
2 // multiple functions called inside the loop)
3 function testSlowArrayPopMultiFrame() {
4 var a = [];
5 for (var i = 0; i < 9; i++)
6 a[i] = [0];
7 a[8].__defineGetter__("0", function () { return 23; });
9 function child(a, i) {
10 return a[i].pop(); // reenters interpreter in getter
11 }
12 function parent(a, i) {
13 return child(a, i);
14 }
15 function gramps(a, i) {
16 return parent(a, i);
17 }
19 var last;
20 for (var i = 0; i < 9; i++)
21 last = gramps(a, i);
22 return last;
23 }
24 assertEq(testSlowArrayPopMultiFrame(), 23);