зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1706613: part 1) Change `NS_ASSERTION`s to `MOZ_ASSERT`s in `mozInlineSpellChecker`. r=smaug
Helps to detect violations during Try runs. Differential Revision: https://phabricator.services.mozilla.com/D112958
This commit is contained in:
Родитель
66bc0de987
Коммит
d45f47b9a0
|
@ -364,7 +364,7 @@ nsresult mozInlineSpellStatus::FinishNavigationEvent(
|
|||
return NS_ERROR_FAILURE; // editor is gone
|
||||
}
|
||||
|
||||
NS_ASSERTION(mAnchorRange, "No anchor for navigation!");
|
||||
MOZ_ASSERT(mAnchorRange, "No anchor for navigation!");
|
||||
|
||||
if (!mOldNavigationAnchorRange->IsPositioned()) {
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
@ -764,7 +764,7 @@ mozInlineSpellChecker::SetEnableRealTimeSpell(bool aEnabled) {
|
|||
|
||||
// Called when nsIEditorSpellCheck::InitSpellChecker completes.
|
||||
nsresult mozInlineSpellChecker::EditorSpellCheckInited() {
|
||||
NS_ASSERTION(mPendingSpellCheck, "Spell check should be pending!");
|
||||
MOZ_ASSERT(mPendingSpellCheck, "Spell check should be pending!");
|
||||
|
||||
// spell checking is enabled, register our event listeners to track navigation
|
||||
RegisterEventListeners();
|
||||
|
@ -788,7 +788,7 @@ void mozInlineSpellChecker::ChangeNumPendingSpellChecks(
|
|||
int32_t aDelta, TextEditor* aTextEditor) {
|
||||
int8_t oldNumPending = mNumPendingSpellChecks;
|
||||
mNumPendingSpellChecks += aDelta;
|
||||
NS_ASSERTION(mNumPendingSpellChecks >= 0,
|
||||
MOZ_ASSERT(mNumPendingSpellChecks >= 0,
|
||||
"Unbalanced ChangeNumPendingSpellChecks calls!");
|
||||
if (oldNumPending == 0 && mNumPendingSpellChecks > 0) {
|
||||
NotifyObservers(INLINESPELL_STARTED_TOPIC, aTextEditor);
|
||||
|
@ -1543,7 +1543,7 @@ nsresult mozInlineSpellChecker::ResumeCheck(
|
|||
if (aStatus->IsFullSpellCheck()) {
|
||||
// Allow posting new spellcheck resume events from inside
|
||||
// ResumeCheck, now that we're actually firing.
|
||||
NS_ASSERTION(mFullSpellCheckScheduled,
|
||||
MOZ_ASSERT(mFullSpellCheckScheduled,
|
||||
"How could this be false? The full spell check is "
|
||||
"calling us!!");
|
||||
mFullSpellCheckScheduled = false;
|
||||
|
@ -1892,7 +1892,7 @@ NS_IMETHODIMP mozInlineSpellChecker::UpdateCurrentDictionary() {
|
|||
// Called when nsIEditorSpellCheck::UpdateCurrentDictionary completes.
|
||||
nsresult mozInlineSpellChecker::CurrentDictionaryUpdated() {
|
||||
mNumPendingUpdateCurrentDictionary--;
|
||||
NS_ASSERTION(mNumPendingUpdateCurrentDictionary >= 0,
|
||||
MOZ_ASSERT(mNumPendingUpdateCurrentDictionary >= 0,
|
||||
"CurrentDictionaryUpdated called without corresponding "
|
||||
"UpdateCurrentDictionary call!");
|
||||
ChangeNumPendingSpellChecks(-1);
|
||||
|
|
Загрузка…
Ссылка в новой задаче