168999: don't uninit the spellchecker twice, and eliminate the non-thread-safe asserts

This commit is contained in:
akkana%netscape.com 2002-10-17 04:22:27 +00:00
parent d9dffe0d16
commit c90a5da673
2 changed files with 12 additions and 2 deletions

View File

@ -61,6 +61,7 @@ nsEditorSpellCheck::nsEditorSpellCheck()
: mSuggestedWordIndex(0)
, mDictionaryIndex(0)
{
NS_INIT_ISUPPORTS();
}
nsEditorSpellCheck::~nsEditorSpellCheck()

View File

@ -491,7 +491,11 @@ function doDefault()
function CancelSpellCheck()
{
if (gSpellChecker)
gSpellChecker.UninitSpellChecker();
{
try {
gSpellChecker.UninitSpellChecker();
} finally { gSpellChecker = null; }
}
// Signal to calling window that we canceled
window.opener.cancelSendMessage = true;
@ -501,7 +505,12 @@ function CancelSpellCheck()
function onClose()
{
if (gSpellChecker)
gSpellChecker.UninitSpellChecker();
{
try {
gSpellChecker.UninitSpellChecker();
} finally { gSpellChecker = null; }
}
window.opener.cancelSendMessage = false;
window.close();
}