rem: pref = Components.classes['@mozilla.org/preferences;1']; pref = pref.getService(); pref = pref.QueryInterface(Components.interfaces.nsIPref); 
add: pref = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); 
context: function Startup(){  signonviewer = Components.classes["@mozilla.org/signonviewer/signonviewer-world;1"].createInstance();  signonviewer = signonviewer.QueryInterface(Components.interfaces.nsISignonViewer);  passwordmanager = Components.classes["@mozilla.org/passwordmanager;1"].getService();  passwordmanager = passwordmanager.QueryInterface(Components.interfaces.nsIPasswordManager);  doSetOKCancel(onOK, null);  // init ok event handler  // remove wallet functions (unless overruled by the "wallet.enabled" pref)  try {    pref = Components.classes['@mozilla.org/preferences;1'];    pref = pref.getService();    pref = pref.QueryInterface(Components.interfaces.nsIPref);    try {      if (!pref.GetBoolPref("wallet.enabled")) {        var element;        element = document.getElementById("nopreview");        element.setAttribute("hidden", "true");        element = document.getElementById("nocapture");        element.setAttribute("hidden", "true");      }    } catch(e) {      dump("wallet.enabled pref is missing from all.js");    }    try {      encrypted = pref.GetBoolPref("wallet.crypto");    } catch(e) {      dump("wallet.crypto pref is missing from all.js");    }  } catch (ex) {    dump("failed to get prefs service!\n");    pref = null;  }  var tab = window.arguments[0];  if (tab == "S") {    element = document.getElementById("signonTabbox");    element.selectedIndex = 0;    // hide non-used tabs    element = document.getElementById("nopreview");    element.setAttribute("hidden", "true");    element = document.getElementById("nocapture");    element.setAttribute("hidden", "true");    if (!LoadSignons()) {      return; /* user failed to unlock the database */    }    LoadReject();  } else if (tab == "W") {    element = document.getElementById("signonviewer");    element.setAttribute("title", element.getAttribute("alttitle"));        element = document.getElementById("signonTabbox");    element.selectedIndex = 2;    // hide non-used tabs    element = document.getElementById("signonTab");    element.setAttribute("hidden", "true");    element = document.getElementById("signonSitesTab");    element.setAttribute("hidden", "true");    LoadNopreview();    LoadNocapture();  } else {    /* invalid value for argument */  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/f1f4e0d7a57ab7bc6d826daa2e6141efd69e1dce/SignonViewer.js/buggy/extensions/wallet/signonviewer/SignonViewer.js