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 // A Set iterator does not visit entries removed by clear().
3 load(libdir + "iteration.js");
5 var s = Set();
6 var it = s[std_iterator]();
7 s.clear();
8 assertIteratorDone(it, undefined);
10 s = Set(["a", "b", "c", "d"]);
11 it = s[std_iterator]();
12 assertIteratorNext(it, "a");
13 s.clear();
14 assertIteratorDone(it, undefined);
16 var log = "";
17 s = Set(["a", "b", "c", "d"]);
18 for (var v of s) {
19 log += v;
20 if (v == "b")
21 s.clear();
22 }
23 assertEq(log, "ab");