Bug 1119254 - Mark virtual overridden functions as MOZ_OVERRIDE in xpcom; r=froydnj
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 08 Jan 2015 10:12:45 -0500
changeset 248615 c1dd3c739bf30f5be7ee706ec8e6c641d4ecf164
parent 248614 1ce77cbf99f31888dafcd61c0499b1019e0e859c
child 248616 5d5984e1c1864103e9337d1fdcf5564acbe153e0
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)
reviewersfroydnj
bugs1119254
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 1119254 - Mark virtual overridden functions as MOZ_OVERRIDE in xpcom; r=froydnj
xpcom/tests/TestCOMArray.cpp
xpcom/tests/TestRacingServiceManager.cpp
xpcom/tests/TestTimers.cpp
--- a/xpcom/tests/TestCOMArray.cpp
+++ b/xpcom/tests/TestCOMArray.cpp
@@ -30,18 +30,18 @@ class Foo MOZ_FINAL : public IFoo {
 public:
 
   explicit Foo(int32_t aID);
 
   // nsISupports implementation
   NS_DECL_ISUPPORTS
 
   // IFoo implementation
-  NS_IMETHOD_(MozExternalRefCountType) RefCnt() { return mRefCnt; }
-  NS_IMETHOD_(int32_t) ID() { return mID; }
+  NS_IMETHOD_(MozExternalRefCountType) RefCnt() MOZ_OVERRIDE { return mRefCnt; }
+  NS_IMETHOD_(int32_t) ID() MOZ_OVERRIDE { return mID; }
 
   static int32_t gCount;
 
   int32_t mID;
 };
 
 int32_t Foo::gCount = 0;
 
--- a/xpcom/tests/TestRacingServiceManager.cpp
+++ b/xpcom/tests/TestRacingServiceManager.cpp
@@ -91,19 +91,19 @@ class Factory MOZ_FINAL : public nsIFact
 
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
   Factory() : mFirstComponentCreated(false) { }
 
   NS_IMETHOD CreateInstance(nsISupports* aDelegate,
                             const nsIID& aIID,
-                            void** aResult);
+                            void** aResult) MOZ_OVERRIDE;
 
-  NS_IMETHOD LockFactory(bool aLock) {
+  NS_IMETHOD LockFactory(bool aLock) MOZ_OVERRIDE {
     return NS_OK;
   }
 
   bool mFirstComponentCreated;
 };
 
 NS_IMPL_ISUPPORTS(Factory, nsIFactory)
 
--- a/xpcom/tests/TestTimers.cpp
+++ b/xpcom/tests/TestTimers.cpp
@@ -73,17 +73,17 @@ private:
 class TimerCallback MOZ_FINAL : public nsITimerCallback
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
   TimerCallback(nsIThread** aThreadPtr, ReentrantMonitor* aReentrantMonitor)
   : mThreadPtr(aThreadPtr), mReentrantMonitor(aReentrantMonitor) { }
 
-  NS_IMETHOD Notify(nsITimer* aTimer) {
+  NS_IMETHOD Notify(nsITimer* aTimer) MOZ_OVERRIDE {
     NS_ASSERTION(mThreadPtr, "Callback was not supposed to be called!");
     nsCOMPtr<nsIThread> current(do_GetCurrentThread());
 
     ReentrantMonitorAutoEnter mon(*mReentrantMonitor);
 
     NS_ASSERTION(!*mThreadPtr, "Timer called back more than once!");
     *mThreadPtr = current;