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 // Binary: cache/js-dbg-64-434f50e70815-linux
2 // Flags: -m -n -a
3 //
5 var lfcode = new Array();
6 lfcode.push("3");
7 lfcode.push("\
8 evaluate(\"\");\
9 function slice(a, b) {\
10 return slice(index, ++(ArrayBuffer));\
11 }\
12 ");
13 lfcode.push("0");
14 lfcode.push("var arr = [0, 1, 2, 3, 4];\
15 function replacer() {\
16 assertEq(arguments.length, 2);\
17 var key = arguments[0], value = arguments[1];\
18 return value;\
19 }\
20 assertEq(JSON.stringify(arr, replacer), '[0,1,2,3,4]');\
21 ");
22 while (true) {
23 var file = lfcode.shift(); if (file == undefined) { break; }
24 loadFile(file);
25 }
26 function loadFile(lfVarx) {
27 if (!isNaN(lfVarx)) {
28 lfRunTypeId = parseInt(lfVarx);
29 } else {
30 switch (lfRunTypeId) {
31 case 0: evaluate(lfVarx); break;
32 case 3: function newFunc(x) { new Function(x)(); }; newFunc(lfVarx); break;
33 }
34 }
35 }