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 var isWindows = ("@mozilla.org/windows-registry-key;1" in Components.classes);
3 function get_test_program(prog)
4 {
5 var progPath = do_get_cwd();
6 progPath.append(prog);
7 if (isWindows)
8 progPath.leafName = progPath.leafName + ".exe";
9 return progPath;
10 }
12 function set_process_running_environment()
13 {
14 var envSvc = Components.classes["@mozilla.org/process/environment;1"].
15 getService(Components.interfaces.nsIEnvironment);
16 var dirSvc = Components.classes["@mozilla.org/file/directory_service;1"].
17 getService(Components.interfaces.nsIProperties);
18 var greDir = dirSvc.get("GreD", Components.interfaces.nsIFile);
20 envSvc.set("DYLD_LIBRARY_PATH", greDir.path);
21 // For Linux
22 envSvc.set("LD_LIBRARY_PATH", greDir.path);
23 //XXX: handle windows
24 }