Bug 1460509 - part 68: Mark HTMLEditRules::DidMakeBasicBlock() as MOZ_MUST_USE since it may return NS_ERROR_EDITOR_DESTROYED r=m_kato

MozReview-Commit-ID: 5ZxF0ArbnLU

--HG--
extra : rebase_source : 08b22aebdadbadaecbca446998b898e20f25726a
This commit is contained in:
Masayuki Nakano 2018-05-17 19:05:26 +09:00
Родитель 93cbe764ca
Коммит b0c954a103
2 изменённых файлов: 10 добавлений и 5 удалений

Просмотреть файл

@ -768,9 +768,9 @@ HTMLEditRules::DidDoAction(Selection* aSelection,
case EditAction::indent:
case EditAction::outdent:
case EditAction::align:
return DidMakeBasicBlock(aInfo, aResult);
return DidMakeBasicBlock();
case EditAction::setAbsolutePosition: {
nsresult rv = DidMakeBasicBlock(aInfo, aResult);
nsresult rv = DidMakeBasicBlock();
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
@ -4483,8 +4483,7 @@ HTMLEditRules::MakeBasicBlock(nsAtom& blockType)
}
nsresult
HTMLEditRules::DidMakeBasicBlock(RulesInfo* aInfo,
nsresult aResult)
HTMLEditRules::DidMakeBasicBlock()
{
MOZ_ASSERT(IsEditorDataAvailable());

Просмотреть файл

@ -406,7 +406,13 @@ protected:
nsresult WillMakeBasicBlock(const nsAString& aBlockType,
bool* aCancel, bool* aHandled);
nsresult MakeBasicBlock(nsAtom& aBlockType);
nsresult DidMakeBasicBlock(RulesInfo* aInfo, nsresult aResult);
/**
* Called after creating a basic block, indenting, outdenting or aligning
* contents. This method inserts moz-<br> element if start container of
* Selection needs it.
*/
MOZ_MUST_USE nsresult DidMakeBasicBlock();
/**
* Called before changing an element to absolute positioned.