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 function run_test() {
2 var Cc = Components.classes;
3 var Ci = Components.interfaces;
4 var sp = Cc["@mozilla.org/systemprincipal;1"].
5 createInstance(Ci.nsIPrincipal);
6 var s = Components.utils.Sandbox(sp);
7 s.a = [];
8 s.Cu = Components.utils;
9 s.C = Components;
10 s.do_check_neq = do_check_neq;
11 Components.utils.evalInSandbox("do_check_neq(Cu.import, undefined);", s);
12 }