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(arr) throws if arr contains holes (or undefined values).
3 load(libdir + "asserts.js");
4 assertThrowsInstanceOf(function () { Map([undefined]); }, TypeError);
5 assertThrowsInstanceOf(function () { Map([null]); }, TypeError);
6 assertThrowsInstanceOf(function () { Map([[0, 0], [1, 1], , [3, 3]]); }, TypeError);
7 assertThrowsInstanceOf(function () { Map([[0, 0], [1, 1], ,]); }, TypeError);
9 // Map(iterable) throws if iterable doesn't have array-like objects
11 assertThrowsInstanceOf(function () { Map([1, 2, 3]); }, TypeError);
12 assertThrowsInstanceOf(function () {
13 let s = new Set([1, 2, "abc"]);
14 new Map(s);
15 }, TypeError);