Bug 1421561 - Use IgnoredErrorResult in TextEditRules::WillInsertText(). r=masayuki, a=gchang
authorEdgar Chen <echen@mozilla.com>
Wed, 29 Nov 2017 17:09:53 +0800
changeset 445177 5c9a3a3e55b0c288a7c6d6507c729eaff2d3ac9a
parent 445176 a447794c0dd0d34531ea0d9d16e725becf9c7669
child 445178 b3759baf9588dfe9901f82e397832f18bb1cfe54
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki, gchang
bugs1421561
milestone58.0
Bug 1421561 - Use IgnoredErrorResult in TextEditRules::WillInsertText(). r=masayuki, a=gchang 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;