rem: var pref = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); 
add: var prefWindow = parent.hPrefWindow; 
context: function prefCacheSelectFolder(){  var fp = Components.classes["@mozilla.org/filepicker;1"]                     .createInstance(nsIFilePicker);  var pref = Components.classes["@mozilla.org/preferences-service;1"]                     .getService(Components.interfaces.nsIPrefBranch);  var prefutilitiesBundle = document.getElementById("bundle_prefutilities");  var title = prefutilitiesBundle.getString("cachefolder");  fp.init(window, title, nsIFilePicker.modeGetFolder);  try   {    var initialDir = pref.getComplexValue(kCacheParentDirPref, nsILocalFile);    if (initialDir)      fp.displayDirectory = initialDir;  }  catch (ex)  {    // ignore exception: file picker will open at default location  }  fp.appendFilters(nsIFilePicker.filterAll);  var ret = fp.show();  if (ret == nsIFilePicker.returnOK) {    var localFile = fp.file.QueryInterface(nsILocalFile);    var viewable = fp.file.path;    var folderField = document.getElementById("browserCacheDiskCacheFolder");    folderField.value = viewable;    pref.setComplexValue(kCacheParentDirPref, nsILocalFile, localFile)  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/52f88824ca62c33fd692467b1d7d9acb04581168/pref-cache.js/clean/xpfe/components/prefwindow/resources/content/pref-cache.js