rem: var persistObj = Components.classes["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"].createInstance(webPersist); 
add: var persistObj = Components.classes["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"].createInstance(Components.interfaces.nsIWebBrowserPersist); 
context: function OutputFileWithPersistAPI(editorDoc, aDestinationLocation, aRelatedFilesParentDir, aMimeType){  gPersistObj = null;  try {    var imeEditor = window.editorShell.editor.QueryInterface(Components.interfaces.nsIEditorIMESupport);    if (imeEditor)      imeEditor.ForceCompositionEnd();    } catch (e) {}  var isLocalFile = false;  try {    var tmp1 = aDestinationLocation.QueryInterface(Components.interfaces.nsIFile);    isLocalFile = true;  }   catch (e) {    try {      var tmp = aDestinationLocation.QueryInterface(Components.interfaces.nsIURI);      isLocalFile = tmp.schemeIs("file");    }    catch (e) {}  }  try {    // we should supply a parent directory if/when we turn on functionality to save related documents    var persistObj = Components.classes["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"].createInstance(webPersist);    persistObj.progressListener = gEditorOutputProgressListener;        var wrapColumn = GetWrapColumn();    var outputFlags = GetOutputFlags(aMimeType, wrapColumn);    // for 4.x parity as well as improving readability of file locally on server    // this will always send crlf for upload (http/ftp)    if (!isLocalFile) // if we aren't saving locally then send both cr and lf      outputFlags |= webPersist.ENCODE_FLAGS_CR_LINEBREAKS | webPersist.ENCODE_FLAGS_LF_LINEBREAKS;    persistObj.persistFlags = persistObj.persistFlags                             | webPersist.PERSIST_FLAGS_NO_BASE_TAG_MODIFICATIONS                            | webPersist.PERSIST_FLAGS_FIXUP_ORIGINAL_DOM;    persistObj.saveDocument(editorDoc, aDestinationLocation, aRelatedFilesParentDir,                             aMimeType, outputFlags, wrapColumn);    gPersistObj = persistObj;  }  catch(e) { dump("caught an error, bail\n"); return false; }  return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/ea816a5ca81eb7029dac0deb3e8d018fbc7a2e0b/ComposerCommands.js/clean/editor/ui/composer/content/ComposerCommands.js