Bug 1557231. Stop using [array] in nsIInlineSpellChecker. r=masayuki

Differential Revision: https://phabricator.services.mozilla.com/D33908

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Boris Zbarsky 2019-06-06 06:59:37 +00:00
parent 8e84b11096
commit dc2b7685d7
2 changed files with 5 additions and 6 deletions

View File

@ -31,7 +31,7 @@ interface nsIInlineSpellChecker : nsISupports
void removeWordFromDictionary(in AString aWord);
void ignoreWord(in AString aWord);
void ignoreWords([array, size_is(aCount)] in wstring aWordsToIgnore, in unsigned long aCount);
void ignoreWords(in Array<AString> aWordsToIgnore);
void updateCurrentDictionary();
readonly attribute boolean spellCheckPending;

View File

@ -923,14 +923,13 @@ mozInlineSpellChecker::IgnoreWord(const nsAString& word) {
// mozInlineSpellChecker::IgnoreWords
NS_IMETHODIMP
mozInlineSpellChecker::IgnoreWords(const char16_t** aWordsToIgnore,
uint32_t aCount) {
mozInlineSpellChecker::IgnoreWords(const nsTArray<nsString>& aWordsToIgnore) {
NS_ENSURE_TRUE(mSpellCheck, NS_ERROR_NOT_INITIALIZED);
// add each word to the ignore list and then recheck the document
for (uint32_t index = 0; index < aCount; index++)
mSpellCheck->IgnoreWordAllOccurrences(
nsDependentString(aWordsToIgnore[index]));
for (auto& word : aWordsToIgnore) {
mSpellCheck->IgnoreWordAllOccurrences(word);
}
auto status = MakeUnique<mozInlineSpellStatus>(this);
nsresult rv = status->InitForSelection();