rem: var dirService = Components.classes["@mozilla.org/directory_service;1"] 
add: var dirService = Components.classes["@mozilla.org/file/directory_service;1"] 
context: function setFromBuddyIcon(email){   var fromBuddyIcon = document.getElementById("fromBuddyIcon");   try {     // better to cache this?     var myScreenName = pref.getCharPref("aim.session.screenname");     var card = abAddressCollector.getCardFromAttribute("PrimaryEmail", email);     if (myScreenName && card && card.aimScreenName) {       if (!gIOService) {         // lazily create these globals         gIOService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);         gFileHandler = gIOService.getProtocolHandler("file").QueryInterface(Components.interfaces.nsIFileProtocolHandler);                  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       // is this a perf hit?  (how expensive is stat()?)       var iconFile = gFileHandler.getFileFromURLSpec(iconURLStr);       if (iconFile.exists()) {         fromBuddyIcon.setAttribute("src", iconURLStr);         return;       }     }   }   catch (ex) {     // can get here if no screenname     //dump("ex = " + ex + "\n");   }   fromBuddyIcon.setAttribute("src", "");}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/9bb3e71fb178ab105cff46f8e8baf5b3bc5aa968/msgHdrViewOverlay.js/buggy/mail/base/content/msgHdrViewOverlay.js