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 this.name = "outer";
3 var sb = evalcx('');
4 sb.name = "inner";
5 sb.parent = this;
7 var res = 0;
9 function f() {
10 assertEq(this.name, "outer");
11 res++;
12 }
14 // ff is a property of the inner global object. Generate a CALLNAME IC, then
15 // change ff to a function on the outer global. It should get the inner this
16 // value.
17 evalcx('this.ff = function() {};' +
18 '(function() { ' +
19 'eval("");' +
20 'for(var i=0; i<10; i++) {' +
21 'ff();' +
22 'if (i == 5) ff = parent.f;' +
23 '}' +
24 '})()', sb);
25 assertEq(res, 4);