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 load(libdir + "asserts.js");
2 load(libdir + "iteration.js");
4 assertThrowsInstanceOf(() => Math.sin(...true), TypeError);
5 assertThrowsInstanceOf(() => Math.sin(...false), TypeError);
6 assertThrowsInstanceOf(() => Math.sin(...new Date()), TypeError);
7 assertThrowsInstanceOf(() => Math.sin(...Function("")), TypeError);
8 assertThrowsInstanceOf(() => Math.sin(...function () {}), TypeError);
9 assertThrowsInstanceOf(() => Math.sin(...(x => x)), TypeError);
10 assertThrowsInstanceOf(() => Math.sin(...1), TypeError);
11 assertThrowsInstanceOf(() => Math.sin(...{}), TypeError);
12 var foo = {}
14 foo[std_iterator] = 10;
15 assertThrowsInstanceOf(() => Math.sin(...foo), TypeError);
17 foo[std_iterator] = function() undefined;
18 assertThrowsInstanceOf(() => Math.sin(...foo), TypeError);
20 foo[std_iterator] = function() this;
21 assertThrowsInstanceOf(() => Math.sin(...foo), TypeError);
23 foo[std_iterator] = function() this;
24 foo.next = function() { throw 10; };
25 assertThrowsValue(() => Math.sin(...foo), 10);
27 assertThrowsInstanceOf(() => Math.sin(.../a/), TypeError);
28 assertThrowsInstanceOf(() => Math.sin(...new Error()), TypeError);