rem: var dirService = Components.classes["@mozilla.org/directory_service;1"] 
add: var dirService = Components.classes["@mozilla.org/file/directory_service;1"] 
context: function setBuddyIcon(card, buddyIcon){  try {    var myScreenName = gPrefs.getCharPref("aim.session.screenname");    if (myScreenName && card.primaryEmail) {      if (!gProfileDirURL) {        // lazily create these file urls, and keep them around        var dirService = Components.classes["@mozilla.org/directory_service;1"]            .getService(Components.interfaces.nsIProperties);        var profileDir = dirService.get("ProfD", Components.interfaces.nsIFile);        gProfileDirURL = gIOService.newFileURI(profileDir);      }      // if we did have a buddy icon on disk for this screenname, this would be the file url spec for it      var iconURLStr = gProfileDirURL.spec + "/NIM/" + myScreenName + "/picture/" + card.aimScreenName + ".gif";      // check if the file exists      var file = gFileHandler.getFileFromURLSpec(iconURLStr);                  // check if the file exists      // is this a perf hit?  (how expensive is stat()?)      if (file.exists()) {        buddyIcon.setAttribute("src", iconURLStr);        return true;      }    }  }  catch (ex) {    // can get here if no screenname  }    buddyIcon.setAttribute("src", "");  return false;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/a825bc8f57ec1e27c3e5558550a31d3fc163feb4/abCardViewOverlay.js/clean/mailnews/addrbook/resources/content/abCardViewOverlay.js