Bug 795708 - Use more nsCOMPtr; r=ehsan
authorAryeh Gregor <ayg@aryeh.name>
Thu, 11 Oct 2012 12:26:15 +0200
changeset 110975 1d2cb3aeb1ac
parent 110974 6bd81cee2f5f
child 110976 c2a70bac7627
push id16846
push usereakhgari@mozilla.com
push dateMon, 22 Oct 2012 18:21:05 +0000
treeherdermozilla-inbound@1d2cb3aeb1ac [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;