Bug 1119258 - Mark virtual overridden functions as MOZ_OVERRIDE in toolkit; r=Mossop
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 08 Jan 2015 10:14:08 -0500
changeset 222887 9838f371e0984bbac1fdc7da9077ff17ae84807a
parent 222886 292a269e6c01b7b0c8743b468b4569570a978392
child 222888 86924ac6a94a9147bcae518239d7a33b5981062b
push id10731
push usercbook@mozilla.com
push dateFri, 09 Jan 2015 14:51:37 +0000
treeherderfx-team@e6756043d930 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMossop
bugs1119258
milestone37.0a1
Bug 1119258 - Mark virtual overridden functions as MOZ_OVERRIDE in toolkit; r=Mossop
toolkit/components/downloads/nsDownloadProxy.h
toolkit/components/filewatcher/NativeFileWatcherNotSupported.h
toolkit/components/url-classifier/nsCheckSummedOutputStream.h
toolkit/components/url-classifier/nsUrlClassifierPrefixSet.h
toolkit/devtools/security/LocalCertService.cpp
toolkit/xre/nsXREDirProvider.h
--- a/toolkit/components/downloads/nsDownloadProxy.h
+++ b/toolkit/components/downloads/nsDownloadProxy.h
@@ -35,17 +35,17 @@ public:
 
   NS_IMETHODIMP Init(nsIURI* aSource,
                      nsIURI* aTarget,
                      const nsAString& aDisplayName,
                      nsIMIMEInfo *aMIMEInfo,
                      PRTime aStartTime,
                      nsIFile* aTempFile,
                      nsICancelable* aCancelable,
-                     bool aIsPrivate) {
+                     bool aIsPrivate) MOZ_OVERRIDE {
     nsresult rv;
     nsCOMPtr<nsIDownloadManager> dm = do_GetService("@mozilla.org/download-manager;1", &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     
     rv = dm->AddDownload(nsIDownloadManager::DOWNLOAD_TYPE_DOWNLOAD, aSource,
                          aTarget, aDisplayName, aMIMEInfo, aStartTime,
                          aTempFile, aCancelable, aIsPrivate,
                          getter_AddRefs(mInner));
@@ -77,98 +77,98 @@ public:
 
       return dmui->Show(nullptr, mInner, nsIDownloadManagerUI::REASON_NEW_DOWNLOAD, aIsPrivate);
     }
     return rv;
   }
 
   NS_IMETHODIMP OnStateChange(nsIWebProgress* aWebProgress,
                               nsIRequest* aRequest, uint32_t aStateFlags,
-                              nsresult aStatus)
+                              nsresult aStatus) MOZ_OVERRIDE
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->OnStateChange(aWebProgress, aRequest, aStateFlags, aStatus);
   }
   
   NS_IMETHODIMP OnStatusChange(nsIWebProgress *aWebProgress,
                                nsIRequest *aRequest, nsresult aStatus,
-                               const char16_t *aMessage)
+                               const char16_t *aMessage) MOZ_OVERRIDE
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->OnStatusChange(aWebProgress, aRequest, aStatus, aMessage);
   }
 
   NS_IMETHODIMP OnLocationChange(nsIWebProgress *aWebProgress,
                                  nsIRequest *aRequest, nsIURI *aLocation,
-                                 uint32_t aFlags)
+                                 uint32_t aFlags) MOZ_OVERRIDE
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->OnLocationChange(aWebProgress, aRequest, aLocation, aFlags);
   }
   
   NS_IMETHODIMP OnProgressChange(nsIWebProgress *aWebProgress,
                                  nsIRequest *aRequest,
                                  int32_t aCurSelfProgress,
                                  int32_t aMaxSelfProgress,
                                  int32_t aCurTotalProgress,
-                                 int32_t aMaxTotalProgress)
+                                 int32_t aMaxTotalProgress) MOZ_OVERRIDE
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->OnProgressChange(aWebProgress, aRequest,
                                     aCurSelfProgress,
                                     aMaxSelfProgress,
                                     aCurTotalProgress,
                                     aMaxTotalProgress);
   }
 
   NS_IMETHODIMP OnProgressChange64(nsIWebProgress *aWebProgress,
                                    nsIRequest *aRequest,
                                    int64_t aCurSelfProgress,
                                    int64_t aMaxSelfProgress,
                                    int64_t aCurTotalProgress,
-                                   int64_t aMaxTotalProgress)
+                                   int64_t aMaxTotalProgress) MOZ_OVERRIDE
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->OnProgressChange64(aWebProgress, aRequest,
                                       aCurSelfProgress,
                                       aMaxSelfProgress,
                                       aCurTotalProgress,
                                       aMaxTotalProgress);
   }
 
   NS_IMETHODIMP OnRefreshAttempted(nsIWebProgress *aWebProgress,
                                    nsIURI *aUri,
                                    int32_t aDelay,
                                    bool aSameUri,
-                                   bool *allowRefresh)
+                                   bool *allowRefresh) MOZ_OVERRIDE
   {
     *allowRefresh = true;
     return NS_OK;
   }
 
   NS_IMETHODIMP OnSecurityChange(nsIWebProgress *aWebProgress,
-                                 nsIRequest *aRequest, uint32_t aState)
+                                 nsIRequest *aRequest, uint32_t aState) MOZ_OVERRIDE
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->OnSecurityChange(aWebProgress, aRequest, aState);
   }
 
-  NS_IMETHODIMP SetSha256Hash(const nsACString& aHash)
+  NS_IMETHODIMP SetSha256Hash(const nsACString& aHash) MOZ_OVERRIDE
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->SetSha256Hash(aHash);
   }
 
-  NS_IMETHODIMP SetSignatureInfo(nsIArray* aSignatureInfo)
+  NS_IMETHODIMP SetSignatureInfo(nsIArray* aSignatureInfo) MOZ_OVERRIDE
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->SetSignatureInfo(aSignatureInfo);
   }
 
-  NS_IMETHODIMP SetRedirects(nsIArray* aRedirects)
+  NS_IMETHODIMP SetRedirects(nsIArray* aRedirects) MOZ_OVERRIDE
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->SetRedirects(aRedirects);
   }
 
 private:
   nsCOMPtr<nsIDownload> mInner;
 };
--- a/toolkit/components/filewatcher/NativeFileWatcherNotSupported.h
+++ b/toolkit/components/filewatcher/NativeFileWatcherNotSupported.h
@@ -21,25 +21,25 @@ public:
   nsresult Init()
   {
     return NS_OK;
   };
 
   NS_IMETHODIMP AddPath(const nsAString& aPathToWatch,
                         nsINativeFileWatcherCallback* aOnChange,
                         nsINativeFileWatcherErrorCallback* aOnError,
-                        nsINativeFileWatcherSuccessCallback* aOnSuccess)
+                        nsINativeFileWatcherSuccessCallback* aOnSuccess) MOZ_OVERRIDE
   {
     return NS_ERROR_NOT_IMPLEMENTED;
   };
 
   NS_IMETHODIMP RemovePath(const nsAString& aPathToRemove,
                            nsINativeFileWatcherCallback* aOnChange,
                            nsINativeFileWatcherErrorCallback* aOnError,
-                           nsINativeFileWatcherSuccessCallback* aOnSuccess)
+                           nsINativeFileWatcherSuccessCallback* aOnSuccess) MOZ_OVERRIDE
   {
     return NS_ERROR_NOT_IMPLEMENTED;
   };
 
 private:
   ~NativeFileWatcherService() { };
   NativeFileWatcherService(const NativeFileWatcherService& other) MOZ_DELETE;
   void operator=(const NativeFileWatcherService& other) MOZ_DELETE;
--- a/toolkit/components/url-classifier/nsCheckSummedOutputStream.h
+++ b/toolkit/components/url-classifier/nsCheckSummedOutputStream.h
@@ -20,19 +20,19 @@ class nsCheckSummedOutputStream : public
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   // Size of MD5 hash in bytes
   static const uint32_t CHECKSUM_SIZE = 16;
 
   nsCheckSummedOutputStream() {}
 
-  NS_IMETHOD Finish();
-  NS_IMETHOD Write(const char *buf, uint32_t count, uint32_t *result);
-  NS_IMETHOD Init(nsIFile* file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags);
+  NS_IMETHOD Finish() MOZ_OVERRIDE;
+  NS_IMETHOD Write(const char *buf, uint32_t count, uint32_t *result) MOZ_OVERRIDE;
+  NS_IMETHOD Init(nsIFile* file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) MOZ_OVERRIDE;
 
 protected:
   virtual ~nsCheckSummedOutputStream() { nsSafeFileOutputStream::Close(); }
 
   nsCOMPtr<nsICryptoHash> mHash;
   nsAutoCString mCheckSum;
 };
 
--- a/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.h
+++ b/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.h
@@ -21,23 +21,23 @@
 
 class nsUrlClassifierPrefixSet MOZ_FINAL
   : public nsIUrlClassifierPrefixSet
   , public nsIMemoryReporter
 {
 public:
   nsUrlClassifierPrefixSet();
 
-  NS_IMETHOD Init(const nsACString& aName);
-  NS_IMETHOD SetPrefixes(const uint32_t* aArray, uint32_t aLength);
-  NS_IMETHOD GetPrefixes(uint32_t* aCount, uint32_t** aPrefixes);
-  NS_IMETHOD Contains(uint32_t aPrefix, bool* aFound);
-  NS_IMETHOD IsEmpty(bool* aEmpty);
-  NS_IMETHOD LoadFromFile(nsIFile* aFile);
-  NS_IMETHOD StoreToFile(nsIFile* aFile);
+  NS_IMETHOD Init(const nsACString& aName) MOZ_OVERRIDE;
+  NS_IMETHOD SetPrefixes(const uint32_t* aArray, uint32_t aLength) MOZ_OVERRIDE;
+  NS_IMETHOD GetPrefixes(uint32_t* aCount, uint32_t** aPrefixes) MOZ_OVERRIDE;
+  NS_IMETHOD Contains(uint32_t aPrefix, bool* aFound) MOZ_OVERRIDE;
+  NS_IMETHOD IsEmpty(bool* aEmpty) MOZ_OVERRIDE;
+  NS_IMETHOD LoadFromFile(nsIFile* aFile) MOZ_OVERRIDE;
+  NS_IMETHOD StoreToFile(nsIFile* aFile) MOZ_OVERRIDE;
 
   nsresult GetPrefixesNative(FallibleTArray<uint32_t>& outArray);
   size_t SizeInMemory() { return mMemoryInUse; };
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIMEMORYREPORTER
 
 protected:
--- a/toolkit/devtools/security/LocalCertService.cpp
+++ b/toolkit/devtools/security/LocalCertService.cpp
@@ -310,19 +310,19 @@ private:
     if (notBefore > now ||
         notAfter < (now - oneDay)) {
       return NS_ERROR_FAILURE;
     }
 
     return NS_OK;
   }
 
-  virtual void ReleaseNSSResources() {}
+  virtual void ReleaseNSSResources() MOZ_OVERRIDE {}
 
-  virtual void CallCallback(nsresult rv)
+  virtual void CallCallback(nsresult rv) MOZ_OVERRIDE
   {
     (void) mCallback->HandleCert(mCert, rv);
   }
 
   nsMainThreadPtrHandle<nsILocalCertGetCallback> mCallback;
   nsCOMPtr<nsIX509Cert> mCert; // out
 };
 
@@ -337,19 +337,19 @@ public:
   }
 
 private:
   virtual nsresult CalculateResult() MOZ_OVERRIDE
   {
     return RemoveExisting();
   }
 
-  virtual void ReleaseNSSResources() {}
+  virtual void ReleaseNSSResources() MOZ_OVERRIDE {}
 
-  virtual void CallCallback(nsresult rv)
+  virtual void CallCallback(nsresult rv) MOZ_OVERRIDE
   {
     (void) mCallback->HandleResult(rv);
   }
 
   nsMainThreadPtrHandle<nsILocalCertCallback> mCallback;
 };
 
 NS_IMPL_ISUPPORTS(LocalCertService, nsILocalCertService)
--- a/toolkit/xre/nsXREDirProvider.h
+++ b/toolkit/xre/nsXREDirProvider.h
@@ -14,19 +14,19 @@
 #include "nsCOMArray.h"
 #include "mozilla/Attributes.h"
 
 class nsXREDirProvider MOZ_FINAL : public nsIDirectoryServiceProvider2,
                                    public nsIProfileStartup
 {
 public:
   // we use a custom isupports implementation (no refcount)
-  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
-  NS_IMETHOD_(MozExternalRefCountType) AddRef(void);
-  NS_IMETHOD_(MozExternalRefCountType) Release(void);
+  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE;
+  NS_IMETHOD_(MozExternalRefCountType) AddRef(void) MOZ_OVERRIDE;
+  NS_IMETHOD_(MozExternalRefCountType) Release(void) MOZ_OVERRIDE;
 
   NS_DECL_NSIDIRECTORYSERVICEPROVIDER
   NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
   NS_DECL_NSIPROFILESTARTUP
 
   nsXREDirProvider();
 
   // if aXULAppDir is null, use gArgv[0]