context: function setFromBuddyIcon(email){   //dump("XXX email = " + email + "\n");   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 profile = Components.classes["@mozilla.org/profile/manager;1"].getService(Components.interfaces.nsIProfileInternal);         gProfileDirURL = gIOService.newFileURI(profile.getProfileDir(profile.currentProfile));       }       // 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: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/d25d20a1818cd366bfe87f50d19decb450adbad5/msgHdrViewOverlay.js/buggy/mailnews/base/resources/content/msgHdrViewOverlay.js