Bug 1118415 - Mark virtual overridden functions as MOZ_OVERRIDE in rdf; r=bsmedberg
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 06 Jan 2015 15:11:28 -0500
changeset 223395 6615268fcb5021c4a44ff8a2db176b0572a2d8a0
parent 223394 1b580ae355ae5113081cc4e1931d6eaf1afcbebf
child 223396 4b301160418344a5e3ae5f38a174845bd79efb6b
push id28091
push userkwierso@gmail.com
push dateTue, 13 Jan 2015 03:33:36 +0000
treeherderautoland@6485d16e2d79 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs1118415
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 1118415 - Mark virtual overridden functions as MOZ_OVERRIDE in rdf; r=bsmedberg
rdf/base/nsRDFContentSink.cpp
rdf/base/nsRDFService.cpp
rdf/base/nsRDFXMLDataSource.cpp
rdf/datasource/nsLocalStore.cpp
rdf/util/nsRDFResource.h
--- a/rdf/base/nsRDFContentSink.cpp
+++ b/rdf/base/nsRDFContentSink.cpp
@@ -103,30 +103,30 @@ class RDFContentSinkImpl : public nsIRDF
 public:
     RDFContentSinkImpl();
 
     // nsISupports
     NS_DECL_ISUPPORTS
     NS_DECL_NSIEXPATSINK
 
     // nsIContentSink
-    NS_IMETHOD WillParse(void);
-    NS_IMETHOD WillBuildModel(nsDTDMode aDTDMode);
-    NS_IMETHOD DidBuildModel(bool aTerminated);
-    NS_IMETHOD WillInterrupt(void);
-    NS_IMETHOD WillResume(void);
-    NS_IMETHOD SetParser(nsParserBase* aParser);
-    virtual void FlushPendingNotifications(mozFlushType aType) { }
-    NS_IMETHOD SetDocumentCharset(nsACString& aCharset) { return NS_OK; }
-    virtual nsISupports *GetTarget() { return nullptr; }
+    NS_IMETHOD WillParse(void) MOZ_OVERRIDE;
+    NS_IMETHOD WillBuildModel(nsDTDMode aDTDMode) MOZ_OVERRIDE;
+    NS_IMETHOD DidBuildModel(bool aTerminated) MOZ_OVERRIDE;
+    NS_IMETHOD WillInterrupt(void) MOZ_OVERRIDE;
+    NS_IMETHOD WillResume(void) MOZ_OVERRIDE;
+    NS_IMETHOD SetParser(nsParserBase* aParser) MOZ_OVERRIDE;
+    virtual void FlushPendingNotifications(mozFlushType aType) MOZ_OVERRIDE { }
+    NS_IMETHOD SetDocumentCharset(nsACString& aCharset) MOZ_OVERRIDE { return NS_OK; }
+    virtual nsISupports *GetTarget() MOZ_OVERRIDE { return nullptr; }
 
     // nsIRDFContentSink
-    NS_IMETHOD Init(nsIURI* aURL);
-    NS_IMETHOD SetDataSource(nsIRDFDataSource* aDataSource);
-    NS_IMETHOD GetDataSource(nsIRDFDataSource*& aDataSource);
+    NS_IMETHOD Init(nsIURI* aURL) MOZ_OVERRIDE;
+    NS_IMETHOD SetDataSource(nsIRDFDataSource* aDataSource) MOZ_OVERRIDE;
+    NS_IMETHOD GetDataSource(nsIRDFDataSource*& aDataSource) MOZ_OVERRIDE;
 
     // pseudo constants
     static int32_t gRefCnt;
     static nsIRDFService* gRDFService;
     static nsIRDFContainerUtils* gRDFContainerUtils;
     static nsIRDFResource* kRDF_type;
     static nsIRDFResource* kRDF_instanceOf; // XXX should be RDF:type
     static nsIRDFResource* kRDF_Alt;
--- a/rdf/base/nsRDFService.cpp
+++ b/rdf/base/nsRDFService.cpp
@@ -525,17 +525,17 @@ public:
 
     // nsISupports
     NS_DECL_ISUPPORTS
 
     // nsIRDFNode
     NS_DECL_NSIRDFNODE
 
     // nsIRDFDate
-    NS_IMETHOD GetValue(PRTime *value);
+    NS_IMETHOD GetValue(PRTime *value) MOZ_OVERRIDE;
 
 private:
     virtual ~DateImpl();
 
     nsresult EqualsDate(nsIRDFDate* date, bool* result);
     PRTime mValue;
 };
 
@@ -632,17 +632,17 @@ public:
 
     // nsISupports
     NS_DECL_ISUPPORTS
 
     // nsIRDFNode
     NS_DECL_NSIRDFNODE
 
     // nsIRDFInt
-    NS_IMETHOD GetValue(int32_t *value);
+    NS_IMETHOD GetValue(int32_t *value) MOZ_OVERRIDE;
 
 private:
     virtual ~IntImpl();
 
     nsresult EqualsInt(nsIRDFInt* value, bool* result);
     int32_t mValue;
 };
 
--- a/rdf/base/nsRDFXMLDataSource.cpp
+++ b/rdf/base/nsRDFXMLDataSource.cpp
@@ -153,128 +153,128 @@ protected:
 
 public:
     // nsISupports
     NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(RDFXMLDataSourceImpl,
                                              nsIRDFDataSource)
 
     // nsIRDFDataSource
-    NS_IMETHOD GetURI(char* *uri);
+    NS_IMETHOD GetURI(char* *uri) MOZ_OVERRIDE;
 
     NS_IMETHOD GetSource(nsIRDFResource* property,
                          nsIRDFNode* target,
                          bool tv,
-                         nsIRDFResource** source) {
+                         nsIRDFResource** source) MOZ_OVERRIDE {
         return mInner->GetSource(property, target, tv, source);
     }
 
     NS_IMETHOD GetSources(nsIRDFResource* property,
                           nsIRDFNode* target,
                           bool tv,
-                          nsISimpleEnumerator** sources) {
+                          nsISimpleEnumerator** sources) MOZ_OVERRIDE {
         return mInner->GetSources(property, target, tv, sources);
     }
 
     NS_IMETHOD GetTarget(nsIRDFResource* source,
                          nsIRDFResource* property,
                          bool tv,
-                         nsIRDFNode** target) {
+                         nsIRDFNode** target) MOZ_OVERRIDE {
         return mInner->GetTarget(source, property, tv, target);
     }
 
     NS_IMETHOD GetTargets(nsIRDFResource* source,
                           nsIRDFResource* property,
                           bool tv,
-                          nsISimpleEnumerator** targets) {
+                          nsISimpleEnumerator** targets) MOZ_OVERRIDE {
         return mInner->GetTargets(source, property, tv, targets);
     }
 
     NS_IMETHOD Assert(nsIRDFResource* aSource,
                       nsIRDFResource* aProperty,
                       nsIRDFNode* aTarget,
-                      bool tv);
+                      bool tv) MOZ_OVERRIDE;
 
     NS_IMETHOD Unassert(nsIRDFResource* source,
                         nsIRDFResource* property,
-                        nsIRDFNode* target);
+                        nsIRDFNode* target) MOZ_OVERRIDE;
 
     NS_IMETHOD Change(nsIRDFResource* aSource,
                       nsIRDFResource* aProperty,
                       nsIRDFNode* aOldTarget,
-                      nsIRDFNode* aNewTarget);
+                      nsIRDFNode* aNewTarget) MOZ_OVERRIDE;
 
     NS_IMETHOD Move(nsIRDFResource* aOldSource,
                     nsIRDFResource* aNewSource,
                     nsIRDFResource* aProperty,
-                    nsIRDFNode* aTarget);
+                    nsIRDFNode* aTarget) MOZ_OVERRIDE;
 
     NS_IMETHOD HasAssertion(nsIRDFResource* source,
                             nsIRDFResource* property,
                             nsIRDFNode* target,
                             bool tv,
-                            bool* hasAssertion) {
+                            bool* hasAssertion) MOZ_OVERRIDE {
         return mInner->HasAssertion(source, property, target, tv, hasAssertion);
     }
 
-    NS_IMETHOD AddObserver(nsIRDFObserver* aObserver) {
+    NS_IMETHOD AddObserver(nsIRDFObserver* aObserver) MOZ_OVERRIDE {
         return mInner->AddObserver(aObserver);
     }
 
-    NS_IMETHOD RemoveObserver(nsIRDFObserver* aObserver) {
+    NS_IMETHOD RemoveObserver(nsIRDFObserver* aObserver) MOZ_OVERRIDE {
         return mInner->RemoveObserver(aObserver);
     }
 
-    NS_IMETHOD HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, bool *_retval) {
+    NS_IMETHOD HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, bool *_retval) MOZ_OVERRIDE {
         return mInner->HasArcIn(aNode, aArc, _retval);
     }
 
-    NS_IMETHOD HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, bool *_retval) {
+    NS_IMETHOD HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, bool *_retval) MOZ_OVERRIDE {
         return mInner->HasArcOut(aSource, aArc, _retval);
     }
 
     NS_IMETHOD ArcLabelsIn(nsIRDFNode* node,
-                           nsISimpleEnumerator** labels) {
+                           nsISimpleEnumerator** labels) MOZ_OVERRIDE {
         return mInner->ArcLabelsIn(node, labels);
     }
 
     NS_IMETHOD ArcLabelsOut(nsIRDFResource* source,
-                            nsISimpleEnumerator** labels) {
+                            nsISimpleEnumerator** labels) MOZ_OVERRIDE {
         return mInner->ArcLabelsOut(source, labels);
     }
 
-    NS_IMETHOD GetAllResources(nsISimpleEnumerator** aResult) {
+    NS_IMETHOD GetAllResources(nsISimpleEnumerator** aResult) MOZ_OVERRIDE {
         return mInner->GetAllResources(aResult);
     }
 
     NS_IMETHOD GetAllCmds(nsIRDFResource* source,
-                              nsISimpleEnumerator/*<nsIRDFResource>*/** commands) {
+                              nsISimpleEnumerator/*<nsIRDFResource>*/** commands) MOZ_OVERRIDE {
         return mInner->GetAllCmds(source, commands);
     }
 
     NS_IMETHOD IsCommandEnabled(nsISupportsArray/*<nsIRDFResource>*/* aSources,
                                 nsIRDFResource*   aCommand,
                                 nsISupportsArray/*<nsIRDFResource>*/* aArguments,
-                                bool* aResult) {
+                                bool* aResult) MOZ_OVERRIDE {
         return mInner->IsCommandEnabled(aSources, aCommand, aArguments, aResult);
     }
 
     NS_IMETHOD DoCommand(nsISupportsArray/*<nsIRDFResource>*/* aSources,
                          nsIRDFResource*   aCommand,
-                         nsISupportsArray/*<nsIRDFResource>*/* aArguments) {
+                         nsISupportsArray/*<nsIRDFResource>*/* aArguments) MOZ_OVERRIDE {
         // XXX Uh oh, this could cause problems wrt. the "dirty" flag
         // if it changes the in-memory store's internal state.
         return mInner->DoCommand(aSources, aCommand, aArguments);
     }
 
-    NS_IMETHOD BeginUpdateBatch() {
+    NS_IMETHOD BeginUpdateBatch() MOZ_OVERRIDE {
         return mInner->BeginUpdateBatch();
     }
 
-    NS_IMETHOD EndUpdateBatch() {
+    NS_IMETHOD EndUpdateBatch() MOZ_OVERRIDE {
         return mInner->EndUpdateBatch();
     }
 
     // nsIRDFRemoteDataSource interface
     NS_DECL_NSIRDFREMOTEDATASOURCE
 
     // nsIRDFXMLSink interface
     NS_DECL_NSIRDFXMLSINK
@@ -290,24 +290,24 @@ public:
 
     // nsIInterfaceRequestor
     NS_DECL_NSIINTERFACEREQUESTOR
 
     // nsIChannelEventSink
     NS_DECL_NSICHANNELEVENTSINK
 
     // rdfIDataSource
-    NS_IMETHOD VisitAllSubjects(rdfITripleVisitor *aVisitor) {
+    NS_IMETHOD VisitAllSubjects(rdfITripleVisitor *aVisitor) MOZ_OVERRIDE {
         nsresult rv;
         nsCOMPtr<rdfIDataSource> rdfds = do_QueryInterface(mInner, &rv);
         if (NS_FAILED(rv)) return rv;
         return rdfds->VisitAllSubjects(aVisitor);
     } 
 
-    NS_IMETHOD VisitAllTriples(rdfITripleVisitor *aVisitor) {
+    NS_IMETHOD VisitAllTriples(rdfITripleVisitor *aVisitor) MOZ_OVERRIDE {
         nsresult rv;
         nsCOMPtr<rdfIDataSource> rdfds = do_QueryInterface(mInner, &rv);
         if (NS_FAILED(rv)) return rv;
         return rdfds->VisitAllTriples(aVisitor);
     } 
 
     // Implementation methods
     bool
--- a/rdf/datasource/nsLocalStore.cpp
+++ b/rdf/datasource/nsLocalStore.cpp
@@ -61,136 +61,136 @@ public:
     // nsISupports interface
     NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(LocalStoreImpl, nsILocalStore)
 
     // nsILocalStore interface
 
     // nsIRDFDataSource interface. Most of these are just delegated to
     // the inner, in-memory datasource.
-    NS_IMETHOD GetURI(char* *aURI);
+    NS_IMETHOD GetURI(char* *aURI) MOZ_OVERRIDE;
 
     NS_IMETHOD GetSource(nsIRDFResource* aProperty,
                          nsIRDFNode* aTarget,
                          bool aTruthValue,
-                         nsIRDFResource** aSource) {
+                         nsIRDFResource** aSource) MOZ_OVERRIDE {
         return mInner->GetSource(aProperty, aTarget, aTruthValue, aSource);
     }
 
     NS_IMETHOD GetSources(nsIRDFResource* aProperty,
                           nsIRDFNode* aTarget,
                           bool aTruthValue,
-                          nsISimpleEnumerator** aSources) {
+                          nsISimpleEnumerator** aSources) MOZ_OVERRIDE {
         return mInner->GetSources(aProperty, aTarget, aTruthValue, aSources);
     }
 
     NS_IMETHOD GetTarget(nsIRDFResource* aSource,
                          nsIRDFResource* aProperty,
                          bool aTruthValue,
-                         nsIRDFNode** aTarget) {
+                         nsIRDFNode** aTarget) MOZ_OVERRIDE {
         return mInner->GetTarget(aSource, aProperty, aTruthValue, aTarget);
     }
 
     NS_IMETHOD GetTargets(nsIRDFResource* aSource,
                           nsIRDFResource* aProperty,
                           bool aTruthValue,
-                          nsISimpleEnumerator** aTargets) {
+                          nsISimpleEnumerator** aTargets) MOZ_OVERRIDE {
         return mInner->GetTargets(aSource, aProperty, aTruthValue, aTargets);
     }
 
     NS_IMETHOD Assert(nsIRDFResource* aSource, 
                       nsIRDFResource* aProperty, 
                       nsIRDFNode* aTarget,
-                      bool aTruthValue) {
+                      bool aTruthValue) MOZ_OVERRIDE {
         return mInner->Assert(aSource, aProperty, aTarget, aTruthValue);
     }
 
     NS_IMETHOD Unassert(nsIRDFResource* aSource,
                         nsIRDFResource* aProperty,
-                        nsIRDFNode* aTarget) {
+                        nsIRDFNode* aTarget) MOZ_OVERRIDE {
         return mInner->Unassert(aSource, aProperty, aTarget);
     }
 
     NS_IMETHOD Change(nsIRDFResource* aSource,
                       nsIRDFResource* aProperty,
                       nsIRDFNode* aOldTarget,
-                      nsIRDFNode* aNewTarget) {
+                      nsIRDFNode* aNewTarget) MOZ_OVERRIDE {
         return mInner->Change(aSource, aProperty, aOldTarget, aNewTarget);
     }
 
     NS_IMETHOD Move(nsIRDFResource* aOldSource,
                     nsIRDFResource* aNewSource,
                     nsIRDFResource* aProperty,
-                    nsIRDFNode* aTarget) {
+                    nsIRDFNode* aTarget) MOZ_OVERRIDE {
         return mInner->Move(aOldSource, aNewSource, aProperty, aTarget);
     }
 
     NS_IMETHOD HasAssertion(nsIRDFResource* aSource,
                             nsIRDFResource* aProperty,
                             nsIRDFNode* aTarget,
                             bool aTruthValue,
-                            bool* hasAssertion) {
+                            bool* hasAssertion) MOZ_OVERRIDE {
         return mInner->HasAssertion(aSource, aProperty, aTarget, aTruthValue, hasAssertion);
     }
 
-    NS_IMETHOD AddObserver(nsIRDFObserver* aObserver) {
+    NS_IMETHOD AddObserver(nsIRDFObserver* aObserver) MOZ_OVERRIDE {
         return NS_ERROR_NOT_IMPLEMENTED;
     }
 
-    NS_IMETHOD RemoveObserver(nsIRDFObserver* aObserver) {
+    NS_IMETHOD RemoveObserver(nsIRDFObserver* aObserver) MOZ_OVERRIDE {
         return NS_ERROR_NOT_IMPLEMENTED;
     }
 
-    NS_IMETHOD HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, bool *_retval) {
+    NS_IMETHOD HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, bool *_retval) MOZ_OVERRIDE {
         return mInner->HasArcIn(aNode, aArc, _retval);
     }
 
-    NS_IMETHOD HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, bool *_retval) {
+    NS_IMETHOD HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, bool *_retval) MOZ_OVERRIDE {
         return mInner->HasArcOut(aSource, aArc, _retval);
     }
 
     NS_IMETHOD ArcLabelsIn(nsIRDFNode* aNode,
-                           nsISimpleEnumerator** aLabels) {
+                           nsISimpleEnumerator** aLabels) MOZ_OVERRIDE {
         return mInner->ArcLabelsIn(aNode, aLabels);
     }
 
     NS_IMETHOD ArcLabelsOut(nsIRDFResource* aSource,
-                            nsISimpleEnumerator** aLabels) {
+                            nsISimpleEnumerator** aLabels) MOZ_OVERRIDE {
         return mInner->ArcLabelsOut(aSource, aLabels);
     }
 
-    NS_IMETHOD GetAllResources(nsISimpleEnumerator** aResult) {
+    NS_IMETHOD GetAllResources(nsISimpleEnumerator** aResult) MOZ_OVERRIDE {
         return mInner->GetAllResources(aResult);
     }
 
     NS_IMETHOD GetAllCmds(nsIRDFResource* aSource,
-                              nsISimpleEnumerator/*<nsIRDFResource>*/** aCommands);
+                              nsISimpleEnumerator/*<nsIRDFResource>*/** aCommands) MOZ_OVERRIDE;
 
     NS_IMETHOD IsCommandEnabled(nsISupportsArray/*<nsIRDFResource>*/* aSources,
                                 nsIRDFResource*   aCommand,
                                 nsISupportsArray/*<nsIRDFResource>*/* aArguments,
-                                bool* aResult);
+                                bool* aResult) MOZ_OVERRIDE;
 
     NS_IMETHOD DoCommand(nsISupportsArray/*<nsIRDFResource>*/* aSources,
                          nsIRDFResource*   aCommand,
-                         nsISupportsArray/*<nsIRDFResource>*/* aArguments);
+                         nsISupportsArray/*<nsIRDFResource>*/* aArguments) MOZ_OVERRIDE;
 
-    NS_IMETHOD BeginUpdateBatch() {
+    NS_IMETHOD BeginUpdateBatch() MOZ_OVERRIDE {
         return mInner->BeginUpdateBatch();
     }
                                                                                 
-    NS_IMETHOD EndUpdateBatch() {
+    NS_IMETHOD EndUpdateBatch() MOZ_OVERRIDE {
         return mInner->EndUpdateBatch();
     }
 
-    NS_IMETHOD GetLoaded(bool* _result);
-    NS_IMETHOD Init(const char *uri);
-    NS_IMETHOD Flush();
-    NS_IMETHOD FlushTo(const char *aURI);
-    NS_IMETHOD Refresh(bool sync);
+    NS_IMETHOD GetLoaded(bool* _result) MOZ_OVERRIDE;
+    NS_IMETHOD Init(const char *uri) MOZ_OVERRIDE;
+    NS_IMETHOD Flush() MOZ_OVERRIDE;
+    NS_IMETHOD FlushTo(const char *aURI) MOZ_OVERRIDE;
+    NS_IMETHOD Refresh(bool sync) MOZ_OVERRIDE;
 
     // nsIObserver
     NS_DECL_NSIOBSERVER
 };
 
 ////////////////////////////////////////////////////////////////////////
 
 
--- a/rdf/util/nsRDFResource.h
+++ b/rdf/util/nsRDFResource.h
@@ -20,26 +20,26 @@ class nsIRDFService;
  * superclass for more sophisticated resource implementations.
  */
 class nsRDFResource : public nsIRDFResource {
 public:
 
     NS_DECL_THREADSAFE_ISUPPORTS
 
     // nsIRDFNode methods:
-    NS_IMETHOD EqualsNode(nsIRDFNode* aNode, bool* aResult);
+    NS_IMETHOD EqualsNode(nsIRDFNode* aNode, bool* aResult) MOZ_OVERRIDE;
 
     // nsIRDFResource methods:
-    NS_IMETHOD Init(const char* aURI);
-    NS_IMETHOD GetValue(char* *aURI);
-    NS_IMETHOD GetValueUTF8(nsACString& aResult);
-    NS_IMETHOD GetValueConst(const char** aURI);
-    NS_IMETHOD EqualsString(const char* aURI, bool* aResult);
-    NS_IMETHOD GetDelegate(const char* aKey, REFNSIID aIID, void** aResult);
-    NS_IMETHOD ReleaseDelegate(const char* aKey);
+    NS_IMETHOD Init(const char* aURI) MOZ_OVERRIDE;
+    NS_IMETHOD GetValue(char* *aURI) MOZ_OVERRIDE;
+    NS_IMETHOD GetValueUTF8(nsACString& aResult) MOZ_OVERRIDE;
+    NS_IMETHOD GetValueConst(const char** aURI) MOZ_OVERRIDE;
+    NS_IMETHOD EqualsString(const char* aURI, bool* aResult) MOZ_OVERRIDE;
+    NS_IMETHOD GetDelegate(const char* aKey, REFNSIID aIID, void** aResult) MOZ_OVERRIDE;
+    NS_IMETHOD ReleaseDelegate(const char* aKey) MOZ_OVERRIDE;
 
     // nsRDFResource methods:
     nsRDFResource(void);
 
 protected:
     virtual ~nsRDFResource(void);
     static nsIRDFService* gRDFService;
     static nsrefcnt gRDFServiceRefCnt;