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.
michael@0 | 1 | var BUGNUMBER = ''; |
michael@0 | 2 | function printBugNumber (num) |
michael@0 | 3 | { |
michael@0 | 4 | return "foo"; |
michael@0 | 5 | } |
michael@0 | 6 | function optionsClear() { |
michael@0 | 7 | var x = printBugNumber().split(','); |
michael@0 | 8 | } |
michael@0 | 9 | function optionsReset() { |
michael@0 | 10 | optionsClear(); |
michael@0 | 11 | } |
michael@0 | 12 | var code = new Array(); |
michael@0 | 13 | code.push("evaluate"); |
michael@0 | 14 | var x0 = "\ |
michael@0 | 15 | printBugNumber(BUGNUMBER);\n\ |
michael@0 | 16 | function gen()\n\ |
michael@0 | 17 | {\n\ |
michael@0 | 18 | try {\n\ |
michael@0 | 19 | yield 0;\n\ |
michael@0 | 20 | } finally {\n\ |
michael@0 | 21 | }\n\ |
michael@0 | 22 | }\n\ |
michael@0 | 23 | var iter1 = gen( iter1=\"NaN\", new gen(gen)) ;\n\ |
michael@0 | 24 | gc();\n\ |
michael@0 | 25 | "; |
michael@0 | 26 | code.push(x0); |
michael@0 | 27 | code.push("evaluate"); |
michael@0 | 28 | var files = new Array(); |
michael@0 | 29 | while (true) { |
michael@0 | 30 | var file = code.shift(); |
michael@0 | 31 | if (file == "evaluate") { |
michael@0 | 32 | loadFiles(files); |
michael@0 | 33 | } else if (file == undefined) { |
michael@0 | 34 | break; |
michael@0 | 35 | } else { |
michael@0 | 36 | files.push(file); |
michael@0 | 37 | } |
michael@0 | 38 | } |
michael@0 | 39 | function loadFiles(x) { |
michael@0 | 40 | for (i in x) { |
michael@0 | 41 | try { |
michael@0 | 42 | eval(x[i]); |
michael@0 | 43 | } catch (e) { |
michael@0 | 44 | } |
michael@0 | 45 | } |
michael@0 | 46 | optionsReset(); |
michael@0 | 47 | } |
michael@0 | 48 |