From 34015977851f9d565e839f60e1221f4efbd67d08 Mon Sep 17 00:00:00 2001 From: Makoto Kato Date: Mon, 16 Aug 2021 01:39:59 +0000 Subject: [PATCH] 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 --- extensions/spellcheck/src/mozSpellChecker.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/extensions/spellcheck/src/mozSpellChecker.cpp b/extensions/spellcheck/src/mozSpellChecker.cpp index ee8103fd1321..57292deb22eb 100644 --- a/extensions/spellcheck/src/mozSpellChecker.cpp +++ b/extensions/spellcheck/src/mozSpellChecker.cpp @@ -144,18 +144,14 @@ RefPtr mozSpellChecker::CheckWords( nsresult mozSpellChecker::CheckWord(const nsAString& aWord, bool* aIsMisspelled, nsTArray* 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; }