Bug 1122051: Convert extremely-spammy-during-mochitests NS_ENSURE_TRUE in SpellCheckRange() to a simple check-and-return. r=ehsan

This commit is contained in:
Daniel Holbert 2015-01-15 18:11:31 -08:00
parent eb6a050c52
commit 6e44053e90

View File

@ -902,7 +902,11 @@ mozInlineSpellChecker::SpellCheckAfterEditorChange(
nsresult
mozInlineSpellChecker::SpellCheckRange(nsIDOMRange* aRange)
{
NS_ENSURE_TRUE(mSpellCheck, NS_ERROR_NOT_INITIALIZED);
if (!mSpellCheck) {
NS_WARN_IF_FALSE(mPendingSpellCheck,
"Trying to spellcheck, but checking seems to be disabled");
return NS_ERROR_NOT_INITIALIZED;
}
mozInlineSpellStatus status(this);
nsRange* range = static_cast<nsRange*>(aRange);