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 loop1 = '', loop2 = '', actual = '';
3 var obj = {};
4 for (var i = 0; i < 10; i++) {
5 obj['a' + i] = i;
6 loop1 += i;
7 loop2 += 'a' + i;
8 }
10 Object.defineProperty(obj, 'z', {enumerable: true, get: function () {
11 for (var y in obj)
12 actual += y;
13 }});
14 (function() {
15 for each (var e in obj)
16 actual += e;
17 })();
19 assertEq(actual, loop1 + loop2 + "z" + "undefined");