Bug 1118414 - Mark virtual overridden functions as MOZ_OVERRIDE in storage; r=mak
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 06 Jan 2015 15:11:07 -0500
changeset 225575 aa3aec12cc77bbbbfaa77ba434acf50ad6f95202
parent 225574 fdefac62cd56a1ae2f1edfa08d2300b8769888bf
child 225576 6fa12d8daa1707a3a1154eff9fa83b1a01728c0a
push id28167
push userryanvm@gmail.com
push dateSun, 25 Jan 2015 00:24:46 +0000
treeherdermozilla-central@c18776175a69 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1118414
milestone38.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 1118414 - Mark virtual overridden functions as MOZ_OVERRIDE in storage; r=mak
storage/src/IStorageBindingParamsInternal.h
storage/src/StorageBaseStatementInternal.h
storage/src/mozStorageAsyncStatement.cpp
storage/src/mozStorageStatement.cpp
storage/test/storage_test_harness.h
--- a/storage/src/IStorageBindingParamsInternal.h
+++ b/storage/src/IStorageBindingParamsInternal.h
@@ -38,14 +38,14 @@ public:
    */
   virtual already_AddRefed<mozIStorageError> bind(sqlite3_stmt *aStatement) = 0;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(IStorageBindingParamsInternal,
                               ISTORAGEBINDINGPARAMSINTERNAL_IID)
 
 #define NS_DECL_ISTORAGEBINDINGPARAMSINTERNAL \
-  already_AddRefed<mozIStorageError> bind(sqlite3_stmt *aStatement);
+  already_AddRefed<mozIStorageError> bind(sqlite3_stmt *aStatement) MOZ_OVERRIDE;
 
 } // storage
 } // mozilla
 
 #endif // mozilla_storage_IStorageBindingParamsInternal_h_
--- a/storage/src/StorageBaseStatementInternal.h
+++ b/storage/src/StorageBaseStatementInternal.h
@@ -148,20 +148,20 @@ protected: // mix-in bits are protected
   friend class AsyncStatementFinalizer;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(StorageBaseStatementInternal,
                               STORAGEBASESTATEMENTINTERNAL_IID)
 
 #define NS_DECL_STORAGEBASESTATEMENTINTERNAL \
   virtual Connection *getOwner(); \
-  virtual int getAsyncStatement(sqlite3_stmt **_stmt); \
-  virtual nsresult getAsynchronousStatementData(StatementData &_data); \
+  virtual int getAsyncStatement(sqlite3_stmt **_stmt) MOZ_OVERRIDE; \
+  virtual nsresult getAsynchronousStatementData(StatementData &_data) MOZ_OVERRIDE; \
   virtual already_AddRefed<mozIStorageBindingParams> newBindingParams( \
-    mozIStorageBindingParamsArray *aOwner);
+    mozIStorageBindingParamsArray *aOwner) MOZ_OVERRIDE;
 
 /**
  * Helper macro to implement the proxying implementations.  Because we are
  * implementing methods that are part of mozIStorageBaseStatement and the
  * implementation classes already use NS_DECL_MOZISTORAGEBASESTATEMENT we don't
  * need to provide declaration support.
  */
 #define MIX_IMPL(_class, _optionalGuard, _method, _declArgs, _invokeArgs) \
--- a/storage/src/mozStorageAsyncStatement.cpp
+++ b/storage/src/mozStorageAsyncStatement.cpp
@@ -47,71 +47,71 @@ NS_IMPL_CI_INTERFACE_GETTER(AsyncStateme
 class AsyncStatementClassInfo : public nsIClassInfo
 {
 public:
   MOZ_CONSTEXPR AsyncStatementClassInfo() {}
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_IMETHODIMP
-  GetInterfaces(uint32_t *_count, nsIID ***_array)
+  GetInterfaces(uint32_t *_count, nsIID ***_array) MOZ_OVERRIDE
   {
     return NS_CI_INTERFACE_GETTER_NAME(AsyncStatement)(_count, _array);
   }
 
   NS_IMETHODIMP
-  GetHelperForLanguage(uint32_t aLanguage, nsISupports **_helper)
+  GetHelperForLanguage(uint32_t aLanguage, nsISupports **_helper) MOZ_OVERRIDE
   {
     if (aLanguage == nsIProgrammingLanguage::JAVASCRIPT) {
       static AsyncStatementJSHelper sJSHelper;
       *_helper = &sJSHelper;
       return NS_OK;
     }
 
     *_helper = nullptr;
     return NS_OK;
   }
 
   NS_IMETHODIMP
-  GetContractID(char **_contractID)
+  GetContractID(char **_contractID) MOZ_OVERRIDE
   {
     *_contractID = nullptr;
     return NS_OK;
   }
 
   NS_IMETHODIMP
-  GetClassDescription(char **_desc)
+  GetClassDescription(char **_desc) MOZ_OVERRIDE
   {
     *_desc = nullptr;
     return NS_OK;
   }
 
   NS_IMETHODIMP
-  GetClassID(nsCID **_id)
+  GetClassID(nsCID **_id) MOZ_OVERRIDE
   {
     *_id = nullptr;
     return NS_OK;
   }
 
   NS_IMETHODIMP
-  GetImplementationLanguage(uint32_t *_language)
+  GetImplementationLanguage(uint32_t *_language) MOZ_OVERRIDE
   {
     *_language = nsIProgrammingLanguage::CPLUSPLUS;
     return NS_OK;
   }
 
   NS_IMETHODIMP
-  GetFlags(uint32_t *_flags)
+  GetFlags(uint32_t *_flags) MOZ_OVERRIDE
   {
     *_flags = 0;
     return NS_OK;
   }
 
   NS_IMETHODIMP
-  GetClassIDNoAlloc(nsCID *_cid)
+  GetClassIDNoAlloc(nsCID *_cid) MOZ_OVERRIDE
   {
     return NS_ERROR_NOT_AVAILABLE;
   }
 };
 
 NS_IMETHODIMP_(MozExternalRefCountType) AsyncStatementClassInfo::AddRef() { return 2; }
 NS_IMETHODIMP_(MozExternalRefCountType) AsyncStatementClassInfo::Release() { return 1; }
 NS_IMPL_QUERY_INTERFACE(AsyncStatementClassInfo, nsIClassInfo)
--- a/storage/src/mozStorageStatement.cpp
+++ b/storage/src/mozStorageStatement.cpp
@@ -49,71 +49,71 @@ NS_IMPL_CI_INTERFACE_GETTER(Statement,
 class StatementClassInfo : public nsIClassInfo
 {
 public:
   MOZ_CONSTEXPR StatementClassInfo() {}
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_IMETHODIMP
-  GetInterfaces(uint32_t *_count, nsIID ***_array)
+  GetInterfaces(uint32_t *_count, nsIID ***_array) MOZ_OVERRIDE
   {
     return NS_CI_INTERFACE_GETTER_NAME(Statement)(_count, _array);
   }
 
   NS_IMETHODIMP
-  GetHelperForLanguage(uint32_t aLanguage, nsISupports **_helper)
+  GetHelperForLanguage(uint32_t aLanguage, nsISupports **_helper) MOZ_OVERRIDE
   {
     if (aLanguage == nsIProgrammingLanguage::JAVASCRIPT) {
       static StatementJSHelper sJSHelper;
       *_helper = &sJSHelper;
       return NS_OK;
     }
 
     *_helper = nullptr;
     return NS_OK;
   }
 
   NS_IMETHODIMP
-  GetContractID(char **_contractID)
+  GetContractID(char **_contractID) MOZ_OVERRIDE
   {
     *_contractID = nullptr;
     return NS_OK;
   }
 
   NS_IMETHODIMP
-  GetClassDescription(char **_desc)
+  GetClassDescription(char **_desc) MOZ_OVERRIDE
   {
     *_desc = nullptr;
     return NS_OK;
   }
 
   NS_IMETHODIMP
-  GetClassID(nsCID **_id)
+  GetClassID(nsCID **_id) MOZ_OVERRIDE
   {
     *_id = nullptr;
     return NS_OK;
   }
 
   NS_IMETHODIMP
-  GetImplementationLanguage(uint32_t *_language)
+  GetImplementationLanguage(uint32_t *_language) MOZ_OVERRIDE
   {
     *_language = nsIProgrammingLanguage::CPLUSPLUS;
     return NS_OK;
   }
 
   NS_IMETHODIMP
-  GetFlags(uint32_t *_flags)
+  GetFlags(uint32_t *_flags) MOZ_OVERRIDE
   {
     *_flags = 0;
     return NS_OK;
   }
 
   NS_IMETHODIMP
-  GetClassIDNoAlloc(nsCID *_cid)
+  GetClassIDNoAlloc(nsCID *_cid) MOZ_OVERRIDE
   {
     return NS_ERROR_NOT_AVAILABLE;
   }
 };
 
 NS_IMETHODIMP_(MozExternalRefCountType) StatementClassInfo::AddRef() { return 2; }
 NS_IMETHODIMP_(MozExternalRefCountType) StatementClassInfo::Release() { return 1; }
 NS_IMPL_QUERY_INTERFACE(StatementClassInfo, nsIClassInfo)
--- a/storage/test/storage_test_harness.h
+++ b/storage/test/storage_test_harness.h
@@ -195,17 +195,17 @@ void AsyncStatementSpinner::SpinUntilCom
   nsresult rv = NS_OK;
   bool processed = true;
   while (!mCompleted && NS_SUCCEEDED(rv)) {
     rv = thread->ProcessNextEvent(true, &processed);
   }
 }
 
 #define NS_DECL_ASYNCSTATEMENTSPINNER \
-  NS_IMETHOD HandleResult(mozIStorageResultSet *aResultSet);
+  NS_IMETHOD HandleResult(mozIStorageResultSet *aResultSet) MOZ_OVERRIDE;
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Async Helpers
 
 /**
  * Execute an async statement, blocking the main thread until we get the
  * callback completion notification.
  */