Now really backing out the offending mochitest, and also the patch I accidently checked in instead.

This commit is contained in:
Uri Bernstein 2008-10-21 20:29:39 +02:00
Родитель d17be3c2de
Коммит 25096ed723
1 изменённых файлов: 13 добавлений и 11 удалений

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

@ -574,8 +574,19 @@ mozInlineSpellChecker::Init(nsIEditor *aEditor)
nsresult mozInlineSpellChecker::Cleanup()
{
mNumWordsInSpellSelection = 0;
nsCOMPtr<nsISelection> spellCheckSelection;
nsresult rv = GetSpellCheckSelection(getter_AddRefs(spellCheckSelection));
if (NS_FAILED(rv)) {
// Ensure we still unregister event listeners (but return a failure code)
UnregisterEventListeners();
} else {
spellCheckSelection->RemoveAllRanges();
rv = UnregisterEventListeners();
}
mEditor = nsnull;
return UnregisterEventListeners();
return rv;
}
// mozInlineSpellChecker::CanEnableInlineSpellChecking
@ -699,16 +710,7 @@ mozInlineSpellChecker::SetEnableRealTimeSpell(PRBool aEnabled)
{
if (!aEnabled) {
mSpellCheck = nsnull;
nsCOMPtr<nsISelection> spellCheckSelection;
nsresult rv = GetSpellCheckSelection(getter_AddRefs(spellCheckSelection));
if (NS_FAILED(rv)) {
// Ensure we still unregister event listeners (but return a failure code)
Cleanup();
} else {
spellCheckSelection->RemoveAllRanges();
rv = Cleanup();
}
return rv;
return Cleanup();
}
if (!mSpellCheck) {