Bug 1460509 - part 67: Mark HTMLEditRules::WillIndent() as MOZ_MUST_USE since it may return NS_ERROR_EDITOR_DESTROYED r?m_kato draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Thu, 17 May 2018 18:34:00 +0900
changeset 798785 e3cac1b7ff6fee7af79e288a9e5cfa82f2eeb0b8
parent 798784 2179a856265febf7b51b8cd6c56ba1731003ea33
child 798786 ba48afee92855afc89673bdc0305af73f619cc7b
push id110840
push usermasayuki@d-toybox.com
push dateWed, 23 May 2018 13:41:58 +0000
reviewersm_kato
bugs1460509
milestone62.0a1
Bug 1460509 - part 67: Mark HTMLEditRules::WillIndent() as MOZ_MUST_USE since it may return NS_ERROR_EDITOR_DESTROYED r?m_kato MozReview-Commit-ID: 3lP4jp2nOQy
editor/libeditor/HTMLEditRules.h
--- a/editor/libeditor/HTMLEditRules.h
+++ b/editor/libeditor/HTMLEditRules.h
@@ -322,17 +322,25 @@ protected:
 
   nsresult DeleteNonTableElements(nsINode* aNode);
   nsresult WillMakeList(const nsAString* aListType,
                         bool aEntireList,
                         const nsAString* aBulletType,
                         bool* aCancel, bool* aHandled,
                         const nsAString* aItemType = nullptr);
   nsresult WillRemoveList(bool aOrdered, bool* aCancel, bool* aHandled);
-  nsresult WillIndent(bool* aCancel, bool* aHandled);
+
+  /**
+   * Called before indenting around Selection.  This method actually tries to
+   * indent the contents.
+   *
+   * @param aCancel             Returns true if the operation is canceled.
+   * @param aHandled            Returns true if the edit action is handled.
+   */
+  MOZ_MUST_USE nsresult WillIndent(bool* aCancel, bool* aHandled);
 
   /**
    * Called before indenting around Selection and it's in CSS mode.
    * This method actually tries to indent the contents.
    *
    * @param aCancel             Returns true if the operation is canceled.
    * @param aHandled            Returns true if the edit action is handled.
    */