Bug 1421561 - Use IgnoredErrorResult in TextEditRules::WillInsertText(); r?masayuki draft
authorEdgar Chen <echen@mozilla.com>
Wed, 29 Nov 2017 17:09:53 +0800
changeset 705015 5ea2678d61114a8ada1bb96b8c80a6043b059af5
parent 704840 ba84f9bc2682a24c94f1f0eff220b0f825eadd2f
child 742226 f7f60444718e8c12383020559bce9c3e54a6f957
push id91323
push userechen@mozilla.com
push dateWed, 29 Nov 2017 09:39:59 +0000
reviewersmasayuki
bugs1421561
milestone59.0a1
Bug 1421561 - Use IgnoredErrorResult in TextEditRules::WillInsertText(); r?masayuki MozReview-Commit-ID: 5LV5lVEWKO1
editor/libeditor/TextEditRules.cpp
--- a/editor/libeditor/TextEditRules.cpp
+++ b/editor/libeditor/TextEditRules.cpp
@@ -780,17 +780,17 @@ TextEditRules::WillInsertText(EditAction
       // in which case make the caret attach to the next line.
       bool endsWithLF =
         !outString->IsEmpty() && outString->Last() == nsCRT::LF;
       aSelection->SetInterlinePosition(endsWithLF);
 
       MOZ_ASSERT(!pointAfterStringInserted.GetChildAtOffset(),
         "After inserting text into a text node, pointAfterStringInserted."
         "GetChildAtOffset() should be nullptr");
-      ErrorResult error;
+      IgnoredErrorResult error;
       aSelection->Collapse(pointAfterStringInserted, error);
       if (error.Failed()) {
         NS_WARNING("Failed to collapse selection after inserting string");
       }
     }
   }
   ASSERT_PASSWORD_LENGTHS_EQUAL()
   return NS_OK;