Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
3 const Cc = Components.classes;
4 const Ci = Components.interfaces;
6 function run_test() {
7 let manifest = do_get_file('testcompnoaslr.manifest');
8 Components.manager.autoRegister(manifest);
9 var sysInfo = Cc["@mozilla.org/system-info;1"].
10 getService(Ci.nsIPropertyBag2);
11 var ver = parseFloat(sysInfo.getProperty("version"));
12 if (ver < 6.0) {
13 // This is disabled on pre-Vista OSs.
14 do_check_true("{335fb596-e52d-418f-b01c-1bf16ce5e7e4}" in Components.classesByID);
15 } else {
16 do_check_false("{335fb596-e52d-418f-b01c-1bf16ce5e7e4}" in Components.classesByID);
17 }
18 }