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 // map.iterator() is live: entries added during iteration are visited.
3 var map = Map();
4 function force(k) {
5 if (!map.has(k) && k >= 0)
6 map.set(k, k - 1);
7 }
8 force(5);
9 var log = '';
10 for (let [k, v] of map) {
11 log += k + ';';
12 force(v);
13 }
14 assertEq(log, '5;4;3;2;1;0;');
15 assertEq(map.size, 6);