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 JSON = function () {
2 return {
3 stringify: function stringify(value, whitelist) {
4 switch (typeof(value)) {
5 case "object":
6 return value.constructor.name;
7 }
8 }
9 };
10 }();
12 function missingArgTest2() {
13 var testPairs = [
14 ["{}", {}],
15 ["[]", []],
16 ['{"foo":"bar"}', {"foo":"bar"}],
17 ]
19 var a = [];
20 for (var i=0; i < testPairs.length; i++) {
21 var s = JSON.stringify(testPairs[i][1])
22 a[i] = s;
23 }
24 return a.join(",");
25 }
26 assertEq(missingArgTest2(), "Object,Array,Object");