Bug 1119263 - Mark virtual overridden functions as MOZ_OVERRIDE in spellchecker; r=smaug
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 08 Jan 2015 10:15:45 -0500
changeset 248616 5d5984e1c1864103e9337d1fdcf5564acbe153e0
parent 248615 c1dd3c739bf30f5be7ee706ec8e6c641d4ecf164
child 248617 b0b1ccb01cfcae90a0ed8af57973e21c3e64f24e
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1119263
milestone37.0a1
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
Bug 1119263 - Mark virtual overridden functions as MOZ_OVERRIDE in spellchecker; r=smaug
extensions/spellcheck/hunspell/src/mozHunspell.h
extensions/spellcheck/src/mozInlineSpellChecker.cpp
extensions/spellcheck/src/mozSpellChecker.h
--- a/extensions/spellcheck/hunspell/src/mozHunspell.h
+++ b/extensions/spellcheck/hunspell/src/mozHunspell.h
@@ -97,17 +97,17 @@ public:
   nsresult Init();
 
   void LoadDictionaryList(bool aNotifyChildProcesses);
 
   // helper method for converting a word to the charset of the dictionary
   nsresult ConvertCharset(const char16_t* aStr, char ** aDst);
 
   NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
-                            nsISupports* aData, bool aAnonymize)
+                            nsISupports* aData, bool aAnonymize) MOZ_OVERRIDE
   {
     return MOZ_COLLECT_REPORT(
       "explicit/spell-check", KIND_HEAP, UNITS_BYTES, HunspellAllocator::MemoryAllocated(),
       "Memory used by the spell-checking engine.");
   }
 
 protected:
   virtual ~mozHunspell();
--- a/extensions/spellcheck/src/mozInlineSpellChecker.cpp
+++ b/extensions/spellcheck/src/mozInlineSpellChecker.cpp
@@ -495,17 +495,17 @@ class InitEditorSpellCheckCallback MOZ_F
 {
   ~InitEditorSpellCheckCallback() {}
 public:
   NS_DECL_ISUPPORTS
 
   explicit InitEditorSpellCheckCallback(mozInlineSpellChecker* aSpellChecker)
     : mSpellChecker(aSpellChecker) {}
 
-  NS_IMETHOD EditorSpellCheckDone()
+  NS_IMETHOD EditorSpellCheckDone() MOZ_OVERRIDE
   {
     return mSpellChecker ? mSpellChecker->EditorSpellCheckInited() : NS_OK;
   }
 
   void Cancel()
   {
     mSpellChecker = nullptr;
   }
@@ -1945,17 +1945,17 @@ class UpdateCurrentDictionaryCallback MO
 {
 public:
   NS_DECL_ISUPPORTS
 
   explicit UpdateCurrentDictionaryCallback(mozInlineSpellChecker* aSpellChecker,
                                            uint32_t aDisabledAsyncToken)
     : mSpellChecker(aSpellChecker), mDisabledAsyncToken(aDisabledAsyncToken) {}
 
-  NS_IMETHOD EditorSpellCheckDone()
+  NS_IMETHOD EditorSpellCheckDone() MOZ_OVERRIDE
   {
     // Ignore this callback if SetEnableRealTimeSpell(false) was called after
     // the UpdateCurrentDictionary call that triggered it.
     return mSpellChecker->mDisabledAsyncToken > mDisabledAsyncToken ?
            NS_OK :
            mSpellChecker->CurrentDictionaryUpdated();
   }
 
--- a/extensions/spellcheck/src/mozSpellChecker.h
+++ b/extensions/spellcheck/src/mozSpellChecker.h
@@ -30,30 +30,30 @@ public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS(mozSpellChecker)
 
   mozSpellChecker();
 
   nsresult Init();
 
   // nsISpellChecker
-  NS_IMETHOD SetDocument(nsITextServicesDocument *aDoc, bool aFromStartofDoc);
-  NS_IMETHOD NextMisspelledWord(nsAString &aWord, nsTArray<nsString> *aSuggestions);
-  NS_IMETHOD CheckWord(const nsAString &aWord, bool *aIsMisspelled, nsTArray<nsString> *aSuggestions);
-  NS_IMETHOD Replace(const nsAString &aOldWord, const nsAString &aNewWord, bool aAllOccurrences);
-  NS_IMETHOD IgnoreAll(const nsAString &aWord);
+  NS_IMETHOD SetDocument(nsITextServicesDocument *aDoc, bool aFromStartofDoc) MOZ_OVERRIDE;
+  NS_IMETHOD NextMisspelledWord(nsAString &aWord, nsTArray<nsString> *aSuggestions) MOZ_OVERRIDE;
+  NS_IMETHOD CheckWord(const nsAString &aWord, bool *aIsMisspelled, nsTArray<nsString> *aSuggestions) MOZ_OVERRIDE;
+  NS_IMETHOD Replace(const nsAString &aOldWord, const nsAString &aNewWord, bool aAllOccurrences) MOZ_OVERRIDE;
+  NS_IMETHOD IgnoreAll(const nsAString &aWord) MOZ_OVERRIDE;
 
-  NS_IMETHOD AddWordToPersonalDictionary(const nsAString &aWord);
-  NS_IMETHOD RemoveWordFromPersonalDictionary(const nsAString &aWord);
-  NS_IMETHOD GetPersonalDictionary(nsTArray<nsString> *aWordList);
+  NS_IMETHOD AddWordToPersonalDictionary(const nsAString &aWord) MOZ_OVERRIDE;
+  NS_IMETHOD RemoveWordFromPersonalDictionary(const nsAString &aWord) MOZ_OVERRIDE;
+  NS_IMETHOD GetPersonalDictionary(nsTArray<nsString> *aWordList) MOZ_OVERRIDE;
 
-  NS_IMETHOD GetDictionaryList(nsTArray<nsString> *aDictionaryList);
-  NS_IMETHOD GetCurrentDictionary(nsAString &aDictionary);
-  NS_IMETHOD SetCurrentDictionary(const nsAString &aDictionary);
-  NS_IMETHOD CheckCurrentDictionary();
+  NS_IMETHOD GetDictionaryList(nsTArray<nsString> *aDictionaryList) MOZ_OVERRIDE;
+  NS_IMETHOD GetCurrentDictionary(nsAString &aDictionary) MOZ_OVERRIDE;
+  NS_IMETHOD SetCurrentDictionary(const nsAString &aDictionary) MOZ_OVERRIDE;
+  NS_IMETHOD CheckCurrentDictionary() MOZ_OVERRIDE;
 
   void DeleteRemoteEngine() {
     mEngine = nullptr;
   }
 
 protected:
   virtual ~mozSpellChecker();