Bug 795708 - Use more nsCOMPtr; r=ehsan
authorAryeh Gregor <ayg@aryeh.name>
Thu, 11 Oct 2012 12:26:15 +0200
changeset 111066 1d2cb3aeb1ac
parent 111065 6bd81cee2f5f
child 111067 c2a70bac7627
push id23726
push userryanvm@gmail.com
push dateTue, 23 Oct 2012 01:41:58 +0000
treeherdermozilla-central@48502b61a63e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs795708
milestone19.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 795708 - Use more nsCOMPtr; r=ehsan
editor/libeditor/base/nsEditor.cpp
--- a/editor/libeditor/base/nsEditor.cpp
+++ b/editor/libeditor/base/nsEditor.cpp
@@ -3350,17 +3350,17 @@ nsEditor::FindNode(nsINode *aCurrentNode
   if (IsEditorRoot(aCurrentNode)) {
     // Don't allow traversal above the root node! This helps
     // prevent us from accidentally editing browser content
     // when the editor is in a text widget.
 
     return nullptr;
   }
 
-  nsIContent* candidate =
+  nsCOMPtr<nsIContent> candidate =
     FindNextLeafNode(aCurrentNode, aGoForward, bNoBlockCrossing);
   
   if (!candidate) {
     return nullptr;
   }
 
   if (!aEditableNode || IsEditable(candidate)) {
     return candidate;