rem: if (pref) pref.setComplexValue(kCacheParentDirPref, nsILocalFile, path); 
add: prefWindow.setPref("localfile", kCacheParentDirPref, dir); 
context: function Startup(){  var path = null;  var pref = null;  try   {    pref = Components.classes["@mozilla.org/preferences-service;1"]      .getService(Components.interfaces.nsIPrefBranch);    path = pref.getComplexValue(kCacheParentDirPref, nsILocalFile);  }  catch (ex)  {    // parent_directory pref not set; path is null so we'll failover    // to filling in the parent_directory as the profile directory  }  if (!path)  {    try    {      // no disk cache folder found; default to profile directory      var dirSvc = Components.classes["@mozilla.org/file/directory_service;1"]        .getService(nsIProperties);      var ifile = dirSvc.get("ProfD", nsIFile);      path = ifile.QueryInterface(nsILocalFile);      // now remember the new assumption      if (pref)        pref.setComplexValue(kCacheParentDirPref, nsILocalFile, path);    }    catch (ex)    {    }  }  // if both pref and dir svc fail leave this field blank else show path  if (path)    document.getElementById("browserCacheDiskCacheFolder").value =       path.path;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/01e979d9e8b6a06efe22bd0cd18e0189bb6838a6/pref-cache.js/clean/suite/common/pref/pref-cache.js