зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1725593 - Don't use SendCheckAndSuggest. r=masayuki
By bug 1719110, we replace sync IPC's spell checker suggestion with async version. So we should remove this sync IPC call. Differential Revision: https://phabricator.services.mozilla.com/D122579
This commit is contained in:
Родитель
2ae662cff6
Коммит
3401597785
|
@ -144,18 +144,14 @@ RefPtr<mozilla::CheckWordPromise> mozSpellChecker::CheckWords(
|
|||
|
||||
nsresult mozSpellChecker::CheckWord(const nsAString& aWord, bool* aIsMisspelled,
|
||||
nsTArray<nsString>* aSuggestions) {
|
||||
if (XRE_IsContentProcess()) {
|
||||
// Use async version (CheckWords or Suggest) on content process
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult result;
|
||||
bool correct;
|
||||
|
||||
if (XRE_IsContentProcess()) {
|
||||
MOZ_ASSERT(aSuggestions, "Use CheckWords if content process");
|
||||
if (!mEngine->SendCheckAndSuggest(nsString(aWord), aIsMisspelled,
|
||||
aSuggestions)) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (!mSpellCheckingEngine) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче