rem: var filename = ""; var name = this.mContentDisposition; if (name) { const filenamePrefix = "filename="; var ix = name.indexOf(filenamePrefix); if (ix >= 0) {  ix += filenamePrefix.length; filename = name.substr(ix, name.length); if (filename != "") { ix = filename.lastIndexOf(";"); if (ix > 0) filename = filename.substr(0, ix);  filename = filename.replace(/^"|"$/g, ""); 
add: var fileName = "";  if (this.mContentDisposition) { const mhpContractID = "@mozilla.org/network/mime-hdrparam;1" const mhpIID = Components.interfaces.nsIMIMEHeaderParam; const mhp = Components.classes[mhpContractID].getService(mhpIID); var dummy = { value: null }; var charset = getCharsetforSave(null);  try { fileName = mhp.getParameter(this.mContentDisposition, "filename", charset, true, dummy); } catch (e) { try { fileName = mhp.getParameter(this.mContentDisposition, "name", charset, true, dummy); } catch (e) { 
context:   get suggestedFileName()  {    var filename = "";    var name = this.mContentDisposition;    if (name) {      const filenamePrefix = "filename=";      var ix = name.indexOf(filenamePrefix);      if (ix >= 0) {        // Adjust ix to point to start of actual name        ix += filenamePrefix.length;        filename = name.substr(ix, name.length);        if (filename != "") {          ix = filename.lastIndexOf(";");          if (ix > 0)            filename = filename.substr(0, ix);                    filename = filename.replace(/^"|"$/g, "");        }      }    }    return filename;  }  
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/a3e1ff439e488ed03fe92f98eeaae7ff56dfa44a/contentAreaUtils.js/buggy/suite/common/contentAreaUtils.js