diff --git a/mozilla/editor/libeditor/html/nsHTMLEditorLog.cpp b/mozilla/editor/libeditor/html/nsHTMLEditorLog.cpp index f25a94e25de..98594f685c0 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditorLog.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditorLog.cpp @@ -47,6 +47,7 @@ #include "nsISelection.h" #include "nsIDOMRange.h" #include "nsHTMLEditorLog.h" +#include "nsNetUtil.h" #include "nsCOMPtr.h" #include "nsCRT.h" #include "prprf.h" @@ -847,16 +848,9 @@ nsHTMLEditorLog::StartLogging(nsIFile *aLogFile) return result; } - mFileStream = do_CreateInstance(NS_LOCALFILEOUTPUTSTREAM_CONTRACTID, &result); + result = NS_NewLocalFileOutputStream(getter_AddRefs(mFileStream), aLogFile); if (NS_FAILED(result)) return result; - result = mFileStream->Init(aLogFile, -1, -1, 0); - if (NS_FAILED(result)) - { - mFileStream = nsnull; - return result; - } - if (mTxnMgr) { mEditorTxnLog = new nsEditorTxnLog(this); diff --git a/mozilla/editor/libeditor/html/nsHTMLEditorLog.h b/mozilla/editor/libeditor/html/nsHTMLEditorLog.h index 9ee61921533..a6e4da6e59c 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditorLog.h +++ b/mozilla/editor/libeditor/html/nsHTMLEditorLog.h @@ -55,7 +55,7 @@ class nsHTMLEditorLog : public nsHTMLEditor, { private: - nsCOMPtr mFileStream; + nsCOMPtr mFileStream; nsEditorTxnLog *mEditorTxnLog; PRInt32 mLocked; PRInt32 mDepth;