Bug 712510 - Initialize the return value in the extremely odd case where it's never assigned to before returning; r=roc
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 03 Jan 2012 19:28:45 -0500
changeset 83709 6840cbb0b4cfd332db08b53dfaff646248dbae4b
parent 83708 9ca7f53b97753c65d0394862eeaad7c22d66ba8e
child 83710 7d6b4a1557f476a79acaf272e56ea5ad64b69fe4
push id21784
push usermak77@bonardo.net
push dateWed, 04 Jan 2012 12:28:24 +0000
treeherdermozilla-central@0eec6ba6a87a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs712510
milestone12.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 712510 - Initialize the return value in the extremely odd case where it's never assigned to before returning; r=roc
content/html/content/src/nsTextEditorState.cpp
--- a/content/html/content/src/nsTextEditorState.cpp
+++ b/content/html/content/src/nsTextEditorState.cpp
@@ -1165,17 +1165,17 @@ nsTextEditorState::PrepareEditor(const n
   editorFlags |= nsIPlaintextEditor::eEditorUseAsyncUpdatesMask;
   
   // Spell check is diabled at creation time. It is enabled once
   // the editor comes into focus.
   editorFlags |= nsIPlaintextEditor::eEditorSkipSpellCheck;
 
   bool shouldInitializeEditor = false;
   nsCOMPtr<nsIEditor> newEditor; // the editor that we might create
-  nsresult rv;
+  nsresult rv = NS_OK;
   if (!mEditor) {
     shouldInitializeEditor = true;
 
     // Create an editor
     newEditor = do_CreateInstance(kTextEditorCID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // Make sure we clear out the non-breaking space before we initialize the editor