mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
168999: don't uninit the spellchecker twice, and eliminate the non-thread-safe asserts
This commit is contained in:
parent
d9dffe0d16
commit
c90a5da673
@ -61,6 +61,7 @@ nsEditorSpellCheck::nsEditorSpellCheck()
|
||||
: mSuggestedWordIndex(0)
|
||||
, mDictionaryIndex(0)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsEditorSpellCheck::~nsEditorSpellCheck()
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user