mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 771976 - Part 3: Make sure that nsEditorSpellCheck's refcount doesn't go down prematurely; r=roc
--HG-- extra : rebase_source : 08c052ed543bbdcb8bc2c084e8aff24fbd4b40a5
This commit is contained in:
parent
8ab3329755
commit
7ce5477f9b
@ -500,8 +500,6 @@ nsEditorSpellCheck::GetCurrentDictionary(nsAString& aDictionary)
|
||||
{
|
||||
NS_ENSURE_TRUE(mSpellChecker, NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
nsRefPtr<nsEditorSpellCheck> kungFuDeathGrip = this;
|
||||
|
||||
return mSpellChecker->GetCurrentDictionary(aDictionary);
|
||||
}
|
||||
|
||||
@ -510,6 +508,8 @@ nsEditorSpellCheck::SetCurrentDictionary(const nsAString& aDictionary)
|
||||
{
|
||||
NS_ENSURE_TRUE(mSpellChecker, NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
nsRefPtr<nsEditorSpellCheck> kungFuDeathGrip = this;
|
||||
|
||||
if (!mUpdateDictionaryRunning) {
|
||||
|
||||
nsDefaultStringComparator comparator;
|
||||
@ -598,6 +598,8 @@ nsEditorSpellCheck::UpdateCurrentDictionary()
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
nsRefPtr<nsEditorSpellCheck> kungFuDeathGrip = this;
|
||||
|
||||
UpdateDictionnaryHolder holder(this);
|
||||
|
||||
// Get language with html5 algorithm
|
||||
|
Loading…
Reference in New Issue
Block a user