Backed out 2 changesets (bug 1504913) for build bustage in build/src/extensions/spellcheck/src/mozSpellChecker.cpp
authorDorel Luca <dluca@mozilla.com>
Wed, 07 Nov 2018 04:06:58 +0200
changeset 444792 0eab3ff6fe9339507e2a80a7468fef7e0b4632e5
parent 444791 89e02e0a1b7770c164405e1cc1ddcb0363fe87de
child 444793 a15aa42f102ea8c042eff3d5e8e2b08f22f01663
push id109636
push userncsoregi@mozilla.com
push dateWed, 07 Nov 2018 10:00:15 +0000
treeherdermozilla-inbound@64e32a13c482 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1504913
milestone65.0a1
backs out89e02e0a1b7770c164405e1cc1ddcb0363fe87de
ef65164fcac03b9fcd53d15d3ce471f5c40ee2bd
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 2 changesets (bug 1504913) for build bustage in build/src/extensions/spellcheck/src/mozSpellChecker.cpp Backed out changeset 89e02e0a1b77 (bug 1504913) Backed out changeset ef65164fcac0 (bug 1504913)
dom/ipc/ContentChild.cpp
dom/ipc/ContentParent.cpp
editor/nsIEditorSpellCheck.idl
editor/spellchecker/EditorSpellCheck.h
editor/spellchecker/moz.build
editor/spellchecker/nsISpellChecker.h
extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineParent.h
extensions/spellcheck/src/mozSpellChecker.cpp
extensions/spellcheck/src/mozSpellChecker.h
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -140,16 +140,17 @@
 #include "nsIConsoleService.h"
 #include "nsJSEnvironment.h"
 #include "SandboxHal.h"
 #include "nsDebugImpl.h"
 #include "nsHashPropertyBag.h"
 #include "nsLayoutStylesheetCache.h"
 #include "nsThreadManager.h"
 #include "nsAnonymousTemporaryFile.h"
+#include "nsISpellChecker.h"
 #include "nsClipboardProxy.h"
 #include "nsDirectoryService.h"
 #include "nsDirectoryServiceUtils.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsContentPermissionHelper.h"
 #include "nsPluginHost.h"
 #ifdef NS_PRINTING
 #include "nsPrintingProxy.h"
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -2521,17 +2521,17 @@ ContentParent::InitInternal(ProcessPrior
 
   xpcomInit.isLangRTL() = false;
   xpcomInit.haveBidiKeyboards() = false;
   if (bidi) {
     bidi->IsLangRTL(&xpcomInit.isLangRTL());
     bidi->GetHaveBidiKeyboards(&xpcomInit.haveBidiKeyboards());
   }
 
-  RefPtr<mozSpellChecker> spellChecker(mozSpellChecker::Create());
+  nsCOMPtr<nsISpellChecker> spellChecker(mozSpellChecker::Create());
   MOZ_ASSERT(spellChecker, "No spell checker?");
 
   spellChecker->GetDictionaryList(&xpcomInit.dictionaries());
 
   LocaleService::GetInstance()->GetAppLocalesAsLangTags(xpcomInit.appLocales());
   LocaleService::GetInstance()->GetRequestedLocales(xpcomInit.requestedLocales());
 
   nsCOMPtr<nsIClipboard> clipboard(do_GetService("@mozilla.org/widget/clipboard;1"));
@@ -4694,17 +4694,17 @@ ContentParent::IgnoreIPCPrincipal()
                                  "dom.testing.ignore_ipc_principal", false);
   }
   return sIgnoreIPCPrincipal;
 }
 
 void
 ContentParent::NotifyUpdatedDictionaries()
 {
-  RefPtr<mozSpellChecker> spellChecker(mozSpellChecker::Create());
+  nsCOMPtr<nsISpellChecker> spellChecker(mozSpellChecker::Create());
   MOZ_ASSERT(spellChecker, "No spell checker?");
 
   InfallibleTArray<nsString> dictionaries;
   spellChecker->GetDictionaryList(&dictionaries);
 
   for (auto* cp : AllProcesses(eLive)) {
     Unused << cp->SendUpdateDictionaryList(dictionaries);
   }
--- a/editor/nsIEditorSpellCheck.idl
+++ b/editor/nsIEditorSpellCheck.idl
@@ -29,98 +29,98 @@ interface nsIEditorSpellCheck : nsISuppo
   void          InitSpellChecker(in nsIEditor editor, in boolean enableSelectionChecking,
                                  [optional] in nsIEditorSpellCheckCallback callback);
 
   /**
    * When interactively spell checking the document, this will return the
    * value of the next word that is misspelled. This also computes the
    * suggestions which you can get by calling GetSuggestedWord.
    *
-   * @see mozSpellChecker::GetNextMisspelledWord
+   * @see nsISpellChecker::GetNextMisspelledWord
    */
   AString       GetNextMisspelledWord();
 
   /**
    * Used to get suggestions for the last word that was checked and found to
    * be misspelled. The first call will give you the first (best) suggestion.
    * Subsequent calls will iterate through all the suggestions, allowing you
    * to build a list. When there are no more suggestions, an empty string
    * (not a null pointer) will be returned.
    *
-   * @see mozSpellChecker::GetSuggestedWord
+   * @see nsISpellChecker::GetSuggestedWord
    */
   AString       GetSuggestedWord();
 
   /**
    * Check a given word. In spite of the name, this function checks the word
    * you give it, returning true if the word is misspelled. If the word is
    * misspelled, it will compute the suggestions which you can get from
    * GetSuggestedWord().
    *
-   * @see mozSpellChecker::CheckCurrentWord
+   * @see nsISpellChecker::CheckCurrentWord
    */
   boolean       CheckCurrentWord(in AString suggestedWord);
 
   /**
    * Use when modally checking the document to replace a word.
    *
-   * @see mozSpellChecker::CheckCurrentWord
+   * @see nsISpellChecker::CheckCurrentWord
    */
   void          ReplaceWord(in AString misspelledWord, in AString replaceWord, in boolean allOccurrences);
 
   /**
-   * @see mozSpellChecker::IgnoreAll
+   * @see nsISpellChecker::IgnoreAll
    */
   void          IgnoreWordAllOccurrences(in AString word);
 
   /**
    * Fills an internal list of words added to the personal dictionary. These
    * words can be retrieved using GetPersonalDictionaryWord()
    *
-   * @see mozSpellChecker::GetPersonalDictionary
+   * @see nsISpellChecker::GetPersonalDictionary
    * @see GetPersonalDictionaryWord
    */
   void          GetPersonalDictionary();
 
   /**
    * Used after you call GetPersonalDictionary() to iterate through all the
    * words added to the personal dictionary. Will return the empty string when
    * there are no more words.
    */
   AString       GetPersonalDictionaryWord();
 
   /**
    * Adds a word to the current personal dictionary.
    *
-   * @see mozSpellChecker::AddWordToDictionary
+   * @see nsISpellChecker::AddWordToDictionary
    */
   void          AddWordToDictionary(in AString word);
 
   /**
    * Removes a word from the current personal dictionary.
    *
-   * @see mozSpellChecker::RemoveWordFromPersonalDictionary
+   * @see nsISpellChecker::RemoveWordFromPersonalDictionary
    */
   void          RemoveWordFromDictionary(in AString word);
 
   /**
    * Retrieves a list of the currently available dictionaries. The strings will
    * typically be language IDs, like "en-US".
    *
    * @see mozISpellCheckingEngine::GetDictionaryList
    */
   void          GetDictionaryList([array, size_is(count)] out wstring dictionaryList, out uint32_t count);
 
   /**
-   * @see mozSpellChecker::GetCurrentDictionary
+   * @see nsISpellChecker::GetCurrentDictionary
    */
   AString       GetCurrentDictionary();
 
   /**
-   * @see mozSpellChecker::SetCurrentDictionary
+   * @see nsISpellChecker::SetCurrentDictionary
    */
   void          SetCurrentDictionary(in AString dictionary);
 
   /**
    * Call this to free up the spell checking object. It will also save the
    * current selected language as the default for future use.
    *
    * If you have called CanSpellCheck but not InitSpellChecker, you can still
--- a/editor/spellchecker/EditorSpellCheck.h
+++ b/editor/spellchecker/EditorSpellCheck.h
@@ -12,16 +12,17 @@
 #include "nsIEditorSpellCheck.h"        // for NS_DECL_NSIEDITORSPELLCHECK, etc
 #include "nsISupportsImpl.h"
 #include "nsString.h"                   // for nsString
 #include "nsTArray.h"                   // for nsTArray
 #include "nscore.h"                     // for nsresult
 
 class mozSpellChecker;
 class nsIEditor;
+class nsISpellChecker;
 
 namespace mozilla {
 
 class DictionaryFetcher;
 class EditorBase;
 
 enum dictCompare
 {
--- a/editor/spellchecker/moz.build
+++ b/editor/spellchecker/moz.build
@@ -7,16 +7,20 @@
 MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
 
 XPIDL_SOURCES += [
     'nsIInlineSpellChecker.idl',
 ]
 
 XPIDL_MODULE = 'txtsvc'
 
+EXPORTS += [
+    'nsISpellChecker.h',
+]
+
 EXPORTS.mozilla += [
     'EditorSpellCheck.h',
     'TextServicesDocument.h',
 ]
 
 UNIFIED_SOURCES += [
     'EditorSpellCheck.cpp',
     'nsComposeTxtSrvFilter.cpp',
new file mode 100644
--- /dev/null
+++ b/editor/spellchecker/nsISpellChecker.h
@@ -0,0 +1,131 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef nsISpellChecker_h__
+#define nsISpellChecker_h__
+
+#include "mozilla/MozPromise.h"
+#include "nsISupports.h"
+#include "nsStringFwd.h"
+#include "nsTArray.h"
+
+#define NS_ISPELLCHECKER_IID                    \
+{ /* 27bff957-b486-40ae-9f5d-af0cdd211868 */    \
+0x27bff957, 0xb486, 0x40ae, \
+  { 0x9f, 0x5d, 0xaf, 0x0c, 0xdd, 0x21, 0x18, 0x68 } }
+
+namespace mozilla {
+class TextServicesDocument;
+} // namespace mozilla
+
+/**
+ * A generic interface for a spelling checker.
+ */
+class nsISpellChecker  : public nsISupports{
+public:
+
+  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISPELLCHECKER_IID)
+
+  /**
+   * Tells the spellchecker what document to check.
+   * @param aDoc is the document to check.
+   * @param aFromStartOfDoc If true, start check from beginning of document,
+   * if false, start check from current cursor position.
+   */
+  NS_IMETHOD SetDocument(mozilla::TextServicesDocument* aDoc,
+                         bool aFromStartofDoc) = 0;
+
+  /**
+   * Selects (hilites) the next misspelled word in the document.
+   * @param aWord will contain the misspelled word.
+   * @param aSuggestions is an array of nsStrings, that represent the
+   * suggested replacements for the misspelled word.
+   */
+  NS_IMETHOD NextMisspelledWord(nsAString &aWord, nsTArray<nsString> *aSuggestions) = 0;
+
+  /**
+   * Checks if a word is misspelled. No document is required to use this method.
+   * @param aWord is the word to check.
+   * @param aIsMisspelled will be set to true if the word is misspelled.
+   * @param aSuggestions is an array of nsStrings which represent the
+   * suggested replacements for the misspelled word. The array will be empty
+   * if there aren't any suggestions.
+   */
+  NS_IMETHOD CheckWord(const nsAString &aWord, bool *aIsMisspelled, nsTArray<nsString> *aSuggestions) = 0;
+
+  /**
+   * Replaces the old word with the specified new word.
+   * @param aOldWord is the word to be replaced.
+   * @param aNewWord is the word that is to replace old word.
+   * @param aAllOccurrences will replace all occurrences of old
+   * word, in the document, with new word when it is true. If
+   * false, it will replace the 1st occurrence only!
+   */
+  NS_IMETHOD Replace(const nsAString &aOldWord, const nsAString &aNewWord, bool aAllOccurrences) = 0;
+
+  /**
+   * Ignores all occurrences of the specified word in the document.
+   * @param aWord is the word to ignore.
+   */
+  NS_IMETHOD IgnoreAll(const nsAString &aWord) = 0;
+
+  /**
+   * Add a word to the user's personal dictionary.
+   * @param aWord is the word to add.
+   */
+  NS_IMETHOD AddWordToPersonalDictionary(const nsAString &aWord) = 0;
+
+  /**
+   * Remove a word from the user's personal dictionary.
+   * @param aWord is the word to remove.
+   */
+  NS_IMETHOD RemoveWordFromPersonalDictionary(const nsAString &aWord) = 0;
+
+  /**
+   * Returns the list of words in the user's personal dictionary.
+   * @param aWordList is an array of nsStrings that represent the
+   * list of words in the user's personal dictionary.
+   */
+  NS_IMETHOD GetPersonalDictionary(nsTArray<nsString> *aWordList) = 0;
+
+  /**
+   * Returns the list of strings representing the dictionaries
+   * the spellchecker supports. It was suggested that the strings
+   * returned be in the RFC 1766 format. This format looks something
+   * like <ISO 639 language code>-<ISO 3166 country code>.
+   * For example: en-US
+   * @param aDictionaryList is an array of nsStrings that represent the
+   * dictionaries supported by the spellchecker.
+   */
+  NS_IMETHOD GetDictionaryList(nsTArray<nsString> *aDictionaryList) = 0;
+
+  /**
+   * Returns a string representing the current dictionary.
+   * @param aDictionary will contain the name of the dictionary.
+   * This name is the same string that is in the list returned
+   * by GetDictionaryList().
+   */
+  NS_IMETHOD GetCurrentDictionary(nsAString &aDictionary) = 0;
+
+  /**
+   * Tells the spellchecker to use a specific dictionary.
+   * @param aDictionary a string that is in the list returned
+   * by GetDictionaryList() or an empty string. If aDictionary is
+   * empty string, spellchecker will be disabled.
+   */
+  NS_IMETHOD SetCurrentDictionary(const nsAString &aDictionary) = 0;
+
+  /**
+   * Tells the spellchecker to use a specific dictionary from list.
+   * @param aList  a preferred dictionary list
+   */
+  NS_IMETHOD_(RefPtr<mozilla::GenericPromise>)
+    SetCurrentDictionaryFromList(const nsTArray<nsString>& aList) = 0;
+};
+
+NS_DEFINE_STATIC_IID_ACCESSOR(nsISpellChecker, NS_ISPELLCHECKER_IID)
+
+#endif // nsISpellChecker_h__
+
--- a/extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineParent.h
+++ b/extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineParent.h
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #ifndef RemoteSpellcheckEngineParent_h_
 #define RemoteSpellcheckEngineParent_h_
 
 #include "mozilla/PRemoteSpellcheckEngineParent.h"
 #include "nsCOMPtr.h"
 #include "nsTArray.h"
 
-class mozSpellChecker;
+class nsISpellChecker;
 
 namespace mozilla {
 
 class RemoteSpellcheckEngineParent : public PRemoteSpellcheckEngineParent
 {
 public:
   RemoteSpellcheckEngineParent();
 
@@ -31,14 +31,14 @@ public:
   virtual mozilla::ipc::IPCResult RecvCheck(const nsString& aWord, bool* aIsMisspelled) override;
 
   virtual mozilla::ipc::IPCResult RecvCheckAndSuggest(const nsString& aWord,
                                                       bool* aIsMisspelled,
                                                       InfallibleTArray<nsString>* aSuggestions)
       override;
 
 private:
-  RefPtr<mozSpellChecker> mSpellChecker;
+  nsCOMPtr<nsISpellChecker> mSpellChecker;
 };
 
 } // namespace mozilla
 
 #endif
--- a/extensions/spellcheck/src/mozSpellChecker.cpp
+++ b/extensions/spellcheck/src/mozSpellChecker.cpp
@@ -19,23 +19,29 @@
 using mozilla::dom::ContentChild;
 using mozilla::GenericPromise;
 using mozilla::PRemoteSpellcheckEngineChild;
 using mozilla::RemoteSpellcheckEngineChild;
 using mozilla::TextServicesDocument;
 
 #define DEFAULT_SPELL_CHECKER "@mozilla.org/spellchecker/engine;1"
 
+NS_IMPL_CYCLE_COLLECTING_ADDREF(mozSpellChecker)
+NS_IMPL_CYCLE_COLLECTING_RELEASE(mozSpellChecker)
+
+NS_INTERFACE_MAP_BEGIN(mozSpellChecker)
+  NS_INTERFACE_MAP_ENTRY(nsISpellChecker)
+  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsISpellChecker)
+  NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(mozSpellChecker)
+NS_INTERFACE_MAP_END
+
 NS_IMPL_CYCLE_COLLECTION(mozSpellChecker,
                          mTextServicesDocument,
                          mPersonalDictionary)
 
-NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(mozSpellChecker, AddRef)
-NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(mozSpellChecker, Release)
-
 mozSpellChecker::mozSpellChecker()
   : mEngine(nullptr)
 {
 }
 
 mozSpellChecker::~mozSpellChecker()
 {
   if (mPersonalDictionary) {
--- a/extensions/spellcheck/src/mozSpellChecker.h
+++ b/extensions/spellcheck/src/mozSpellChecker.h
@@ -3,143 +3,62 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozSpellChecker_h__
 #define mozSpellChecker_h__
 
 #include "nsCOMPtr.h"
 #include "nsCOMArray.h"
+#include "nsISpellChecker.h"
 #include "nsString.h"
 #include "mozIPersonalDictionary.h"
 #include "mozISpellCheckingEngine.h"
 #include "nsClassHashtable.h"
 #include "nsTArray.h"
 #include "nsCycleCollectionParticipant.h"
 
 class mozEnglishWordUtils;
 
 namespace mozilla {
 class RemoteSpellcheckEngineChild;
-class TextServicesDocument;
 } // namespace mozilla
 
-class mozSpellChecker final
+class mozSpellChecker final : public nsISpellChecker
 {
 public:
-  NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(mozSpellChecker)
-  NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(mozSpellChecker)
+  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
+  NS_DECL_CYCLE_COLLECTION_CLASS(mozSpellChecker)
 
   static already_AddRefed<mozSpellChecker>
   Create()
   {
     RefPtr<mozSpellChecker> spellChecker = new mozSpellChecker();
     nsresult rv = spellChecker->Init();
     NS_ENSURE_SUCCESS(rv, nullptr);
     return spellChecker.forget();
   }
 
-  /**
-   * Tells the spellchecker what document to check.
-   * @param aDoc is the document to check.
-   * @param aFromStartOfDoc If true, start check from beginning of document,
-   * if false, start check from current cursor position.
-   */
-  nsresult SetDocument(mozilla::TextServicesDocument* aTextServicesDocument,
-                       bool aFromStartofDoc);
-
-  /**
-   * Selects (hilites) the next misspelled word in the document.
-   * @param aWord will contain the misspelled word.
-   * @param aSuggestions is an array of nsStrings, that represent the
-   * suggested replacements for the misspelled word.
-   */
-  nsresult NextMisspelledWord(nsAString& aWord,
-                              nsTArray<nsString>* aSuggestions);
-
-  /**
-   * Checks if a word is misspelled. No document is required to use this method.
-   * @param aWord is the word to check.
-   * @param aIsMisspelled will be set to true if the word is misspelled.
-   * @param aSuggestions is an array of nsStrings which represent the
-   * suggested replacements for the misspelled word. The array will be empty
-   * if there aren't any suggestions.
-   */
-  nsresult CheckWord(const nsAString& aWord, bool* aIsMisspelled,
-                     nsTArray<nsString>* aSuggestions);
-
-  /**
-   * Replaces the old word with the specified new word.
-   * @param aOldWord is the word to be replaced.
-   * @param aNewWord is the word that is to replace old word.
-   * @param aAllOccurrences will replace all occurrences of old
-   * word, in the document, with new word when it is true. If
-   * false, it will replace the 1st occurrence only!
-   */
-  nsresult Replace(const nsAString& aOldWord, const nsAString& aNewWord,
-                   bool aAllOccurrences);
-
-  /**
-   * Ignores all occurrences of the specified word in the document.
-   * @param aWord is the word to ignore.
-   */
-  nsresult IgnoreAll(const nsAString& aWord);
+  // nsISpellChecker
+  NS_IMETHOD SetDocument(mozilla::TextServicesDocument* aTextServicesDocument,
+                         bool aFromStartofDoc) override;
+  NS_IMETHOD NextMisspelledWord(nsAString &aWord, nsTArray<nsString> *aSuggestions) override;
+  NS_IMETHOD CheckWord(const nsAString &aWord, bool *aIsMisspelled, nsTArray<nsString> *aSuggestions) override;
+  NS_IMETHOD Replace(const nsAString &aOldWord, const nsAString &aNewWord, bool aAllOccurrences) override;
+  NS_IMETHOD IgnoreAll(const nsAString &aWord) override;
 
-  /**
-   * Add a word to the user's personal dictionary.
-   * @param aWord is the word to add.
-   */
-  nsresult AddWordToPersonalDictionary(const nsAString& aWord);
-
-  /**
-   * Remove a word from the user's personal dictionary.
-   * @param aWord is the word to remove.
-   */
-  nsresult RemoveWordFromPersonalDictionary(const nsAString& aWord);
-
-  /**
-   * Returns the list of words in the user's personal dictionary.
-   * @param aWordList is an array of nsStrings that represent the
-   * list of words in the user's personal dictionary.
-   */
-  nsresult GetPersonalDictionary(nsTArray<nsString>* aWordList);
+  NS_IMETHOD AddWordToPersonalDictionary(const nsAString &aWord) override;
+  NS_IMETHOD RemoveWordFromPersonalDictionary(const nsAString &aWord) override;
+  NS_IMETHOD GetPersonalDictionary(nsTArray<nsString> *aWordList) override;
 
-  /**
-   * Returns the list of strings representing the dictionaries
-   * the spellchecker supports. It was suggested that the strings
-   * returned be in the RFC 1766 format. This format looks something
-   * like <ISO 639 language code>-<ISO 3166 country code>.
-   * For example: en-US
-   * @param aDictionaryList is an array of nsStrings that represent the
-   * dictionaries supported by the spellchecker.
-   */
-  nsresult GetDictionaryList(nsTArray<nsString>* aDictionaryList);
-
-  /**
-   * Returns a string representing the current dictionary.
-   * @param aDictionary will contain the name of the dictionary.
-   * This name is the same string that is in the list returned
-   * by GetDictionaryList().
-   */
-  nsresult GetCurrentDictionary(nsAString& aDictionary);
-
-  /**
-   * Tells the spellchecker to use a specific dictionary.
-   * @param aDictionary a string that is in the list returned
-   * by GetDictionaryList() or an empty string. If aDictionary is
-   * empty string, spellchecker will be disabled.
-   */
-  nsresult SetCurrentDictionary(const nsAString& aDictionary);
-
-  /**
-   * Tells the spellchecker to use a specific dictionary from list.
-   * @param aList  a preferred dictionary list
-   */
-  RefPtr<mozilla::GenericPromise>
-  SetCurrentDictionaryFromList(const nsTArray<nsString>& aList);
+  NS_IMETHOD GetDictionaryList(nsTArray<nsString> *aDictionaryList) override;
+  NS_IMETHOD GetCurrentDictionary(nsAString &aDictionary) override;
+  NS_IMETHOD SetCurrentDictionary(const nsAString &aDictionary) override;
+  NS_IMETHOD_(RefPtr<mozilla::GenericPromise>)
+    SetCurrentDictionaryFromList(const nsTArray<nsString>& aList) override;
 
   void DeleteRemoteEngine() {
     mEngine = nullptr;
   }
 
   mozilla::TextServicesDocument* GetTextServicesDocument();
 
 protected: