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:
Makoto Kato 2021-08-16 01:39:59 +00:00
Родитель 2ae662cff6
Коммит 3401597785
1 изменённых файлов: 5 добавлений и 9 удалений

Просмотреть файл

@ -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;
}