Bug 1460509 - part 70: Mark HTMLEditRules::WillMakeBasicBlock() as MOZ_MUST_USE since it may return NS_ERROR_EDITOR_DESTROYED r?m_kato
MozReview-Commit-ID: 6mfoqUWync8
--- a/editor/libeditor/HTMLEditRules.h
+++ b/editor/libeditor/HTMLEditRules.h
@@ -398,18 +398,27 @@ protected:
* @param aCancel Returns true if the operation is canceled.
* @param aHandled Returns true if the edit action is handled.
*/
MOZ_MUST_USE nsresult
WillRelativeChangeZIndex(int32_t aChange, bool* aCancel, bool* aHandled);
nsresult WillMakeDefListItem(const nsAString* aBlockType, bool aEntireList,
bool* aCancel, bool* aHandled);
- nsresult WillMakeBasicBlock(const nsAString& aBlockType,
- bool* aCancel, bool* aHandled);
+
+ /**
+ * WillMakeBasicBlock() called before changing block style around Selection.
+ * This method actually does something with calling MakeBasicBlock().
+ *
+ * @param aBlockType Necessary block style as string.
+ * @param aCancel Returns true if the operation is canceled.
+ * @param aHandled Returns true if the edit action is handled.
+ */
+ MOZ_MUST_USE nsresult WillMakeBasicBlock(const nsAString& aBlockType,
+ bool* aCancel, bool* aHandled);
/**
* MakeBasicBlock() applies or clears block style around Selection.
* This method creates AutoSelectionRestorer. Therefore, each caller
* need to check if the editor is still available even if this returns
* NS_OK.
*
* @param aBlockType New block tag name.