rem: if (!gProfileDirURL) {  gIconFileURL = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIFileURL); gProfileDirURL = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIFileURL);  
add: if (!gIOService) {  gIOService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); gFileHandler = gIOService.getProtocolHandler("file").QueryInterface(Components.interfaces.nsIFileProtocolHandler);  
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 (!gProfileDirURL) {         // lazily create these file urls, and keep them around         gIconFileURL = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIFileURL);         gProfileDirURL = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIFileURL);         var profile = Components.classes["@mozilla.org/profile/manager;1"].getService(Components.interfaces.nsIProfileInternal);         gProfileDirURL.file = 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()?)       gIconFileURL.spec = iconURLStr;       if (gIconFileURL.file.exists()) {         fromBuddyIcon.setAttribute("src", iconURLStr);         return;       }     }   }   catch (ex) {     // can get here if no screenname   }   fromBuddyIcon.setAttribute("src", "");}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/9a539b7ccdc0af8e0f68d44b3d947899b510e8d1/msgHdrViewOverlay.js/clean/mailnews/base/resources/content/msgHdrViewOverlay.js