rem: registry = Components.classes["@mozilla.org/registry;1"] .createInstance(Components.interfaces.nsIRegistry); 
add: var registry = Components.classes["@mozilla.org/registry;1"] .createInstance(Components.interfaces.nsIRegistry); 
context:   registryToData : function()  {    if (this.loaded == true)      // prevent overwriting of user changes after pane switch back/forth      return;    // set default values, matching the hardcoded ones, in case we fail below    // internal logic    try    {      /* Default files         In case roaming was never set up, we will fail below at reg reading         and use the defaults in this. Set the default files list to some         sensible values, which we will get from the default prefs. */      var pref = Components.classes["@mozilla.org/preferences;1"]                 .getService(Components.interfaces.nsIPrefBranch);      var value = pref.getCharPref("roaming.default.files");      this.Files = value.split(",");    } catch (e) {}    try    {      /* to understand the structure of the registry,         see comment at the const defs above */      // get the Roaming reg branch      registry = Components.classes["@mozilla.org/registry;1"]                           .createInstance(Components.interfaces.nsIRegistry);      registry.openWellKnownRegistry(registry.ApplicationRegistry);      this.registry = registry;      var profMan = Components.classes["@mozilla.org/profile/manager;1"]		              .getService(Components.interfaces.nsIProfile);      var regkey = registry.getKey(registry.Common, this.kRegTreeProfile);      regkey = registry.getKey(regkey, profMan.currentProfile);      this.regkeyProf = regkey;      regkey = registry.getKey(regkey, this.kRegTreeRoaming);      // enabled      value = registry.getInt(regkey, this.kRegKeyEnabled);      this.Enabled = value == 1 ? true : false;      // method (in the sense of the roaming implementation) selection      value = registry.getString(regkey, this.kRegKeyMethod);      if (value == this.kRegValMethodStream)        this.Method = 0;      else if (value == this.kRegValMethodCopy)        this.Method = 1;      // files      value = registry.getString(regkey, this.kRegKeyFiles);      this.Files = value.split(",");      // remove empty entries      for (var i = 0, l = this.Files.length; i < l; i++)      {        if (this.Files[i] == "")          this.Files.splice(i, 1);      }      // stream      var regkeyRoaming = regkey; // save for use in "copy"      regkey = registry.getKey(regkeyRoaming, this.kRegTreeStream);      this.Stream.BaseURL = registry.getString(regkey, this.kRegKeyStreamURL);      this.Stream.Username = registry.getString(regkey,                                                this.kRegKeyStreamUsername);      this.Stream.Password = registry.getString(regkey,                                                this.kRegKeyStreamPassword);      value = registry.getInt(regkey, this.kRegKeyStreamSavePW);      this.Stream.SavePW = value == 1 ? true : false;      // copy      regkey = registry.getKey(regkeyRoaming, this.kRegTreeCopy);      this.Copy.RemoteDir = registry.getString(regkey, this.kRegKeyCopyDir);      // Note that read and write all values. We want to remember them,      // even if not used at the moment.    }    catch (e)    {      if (!this.regkeyProf)        this.showError("ErrorRegRead", undefined, e.message);      // later errors are expected, if we never wrote roaming prefs before,      // fatal otherwise, but we don't know the difference.      else        dump("Error, might be expected (roaming not set up yet): " + e + "\n");    }    this.loaded = true;        /* we might have failed above, but in this case, there is probably no           sense trying it again, so treat that the same as loaded.           This is important for the first setup - the first read will fail. */  },
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/b02d2d1d4e536bd3cc15add0c5405fb469f613c8/all.js/clean/extensions/sroaming/resources/content/prefs/all.js