rem: if (ext && mimeInfo.ExtensionExists(ext)) { 
add: if (ext && mimeInfo && mimeInfo.ExtensionExists(ext)) { 
context: function getDefaultExtension(aFilename, aURI, aContentType){  // This mirrors some code in nsExternalHelperAppService::DoContent  // Use the filename first and then the URI if that fails    var mimeInfo = getMIMEInfoForType(aContentType);  // First try the extension from the filename  const stdURLContractID = "@mozilla.org/network/standard-url;1";  const stdURLIID = Components.interfaces.nsIURL;  var url = Components.classes[stdURLContractID].createInstance(stdURLIID);  url.filePath = aFilename;  var ext = url.fileExtension;  if (ext && mimeInfo.ExtensionExists(ext)) {    return ext;  }    // Well, that failed.  Now try the extension from the URI  var urlext;  try {    url = aURI.QueryInterface(Components.interfaces.nsIURL);    urlext = url.fileExtension;  } catch (e) {  }  if (urlext && mimeInfo.ExtensionExists(urlext)) {    return urlext;  }  else {    try {      return mimeInfo.primaryExtension;    }    catch (e) {      // Fall back on the extensions in the filename and URI for lack      // of anything better.      return ext || urlext;    }  }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/5e47bc0faad96ad16e3f803992e0e63ab4a8326b/contentAreaUtils.js/clean/suite/common/contentAreaUtils.js