зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1444630 - Don't update dictionary after calling UninitSpellChecker. r=masayuki
When calling UninitSpellChecker during calling UpdateDictionary, this crash occurs. Since Thunderbird calls UninitSpellChecker by [Recheck Text] button, this only occurs on Thunderbird. After calling UninitSpellChecker, we should not update dictionary. MozReview-Commit-ID: K4SPJ5FDo8n --HG-- extra : rebase_source : d760c6472f56cef520c399e8c1f20536c3a22e36
This commit is contained in:
Родитель
92195259e0
Коммит
d0832ccf7e
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
function load()
|
||||
{
|
||||
let textarea = document.getElementById("editor");
|
||||
textarea.focus();
|
||||
|
||||
SpecialPowers.Cu.import(
|
||||
"chrome://reftest/content/AsyncSpellCheckTestHelper.jsm")
|
||||
.onSpellCheck(textarea, () => {
|
||||
let isc = SpecialPowers.wrap(textarea).editor.getInlineSpellChecker(false);
|
||||
let sc = isc.spellChecker;
|
||||
|
||||
textarea.setAttribute("lang", "en-US");
|
||||
sc.UpdateCurrentDictionary(() => {
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
});
|
||||
sc.UninitSpellChecker();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="load()">
|
||||
<textarea id="editor" spellchecker="true">ABC</textarea>
|
||||
</body>
|
||||
</html>
|
|
@ -98,4 +98,5 @@ load 1414581.html
|
|||
load 1415231.html
|
||||
load 1425091.html
|
||||
load 1443664.html
|
||||
skip-if(Android) needs-focus load 1444630.html
|
||||
load 1446451.html
|
||||
|
|
|
@ -698,6 +698,7 @@ EditorSpellCheck::UninitSpellChecker()
|
|||
DeleteSuggestedWordList();
|
||||
mDictionaryList.Clear();
|
||||
mDictionaryIndex = 0;
|
||||
mDictionaryFetcherGroup++;
|
||||
mSpellChecker = nullptr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче