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 seen = -1;
3 // Test to make sure the jits get the number of calls, and return value
4 // of setters correct. We should not be affected by whether the setter
5 // modifies its argument or returns some value.
6 function setter(x) {
7 this.val = x;
8 x = 255;
9 bailout();
10 seen++;
11 assertEq(seen, this.val);
12 return 5;
13 }
15 function F(){}
16 Object.defineProperty(F.prototype, "value" , ({set: setter}));
18 function test() {
19 var obj = new F();
20 var itrCount = 10000;
21 for(var i = 0; i < itrCount; i++) {
22 assertEq(obj.value = i, i);
23 assertEq(obj.val, i);
24 }
25 }
26 test();