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 // Removing many Map entries does not cause a live iterator to skip any of the
2 // entries that were not removed. (Compacting a Map must not be observable to
3 // script.)
5 load(libdir + "iteration.js");
7 var map = Map();
8 for (var i = 0; i < 32; i++)
9 map.set(i, i);
10 var iter = map[std_iterator]();
11 assertIteratorNext(iter, [0, 0]);
12 for (var i = 0; i < 30; i++)
13 map.delete(i);
14 assertEq(map.size, 2);
15 for (var i = 32; i < 100; i++)
16 map.set(i, i); // eventually triggers compaction
18 for (var i = 30; i < 100; i++)
19 assertIteratorNext(iter, [i, i]);
21 assertIteratorDone(iter, undefined);