Bug 1118551 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/xslt; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 06 Jan 2015 19:54:22 -0500
changeset 248331 11a89d944dd2f34181f7ef40f71de44dc874829d
parent 248330 f8eb397de371ac7814220b4ac6d0bc9ec13facc4
child 248332 b96b60c75745e5b4b90f01ab510a68da4af37709
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)
reviewersbaku
bugs1118551
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 1118551 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/xslt; r=baku
dom/xslt/xpath/XPathResult.h
dom/xslt/xpath/txExpr.h
dom/xslt/xpath/txXPathObjectAdaptor.h
dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
dom/xslt/xslt/txXSLTPatterns.h
--- a/dom/xslt/xpath/XPathResult.h
+++ b/dom/xslt/xpath/XPathResult.h
@@ -72,17 +72,17 @@ public:
     NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(XPathResult,
                                                            nsIXPathResult)
 
     static XPathResult* FromSupports(nsISupports* aSupports)
     {
         return static_cast<XPathResult*>(static_cast<nsIXPathResult*>(aSupports));
     }
 
-    virtual JSObject* WrapObject(JSContext* aCx);
+    virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
     nsINode* GetParentObject() const
     {
         return mParent;
     }
     uint16_t ResultType() const
     {
         return mResultType;
     }
--- a/dom/xslt/xpath/txExpr.h
+++ b/dom/xslt/xpath/txExpr.h
@@ -134,39 +134,38 @@ public:
      * @return the String representation of this Expr.
     **/
     virtual void toString(nsAString& str) = 0;
 #endif
 }; //-- Expr
 
 #ifdef TX_TO_STRING
 #define TX_DECL_TOSTRING \
-    void toString(nsAString& aDest);
+    void toString(nsAString& aDest) MOZ_OVERRIDE;
 #define TX_DECL_GETNAMEATOM \
-    nsresult getNameAtom(nsIAtom** aAtom);
+    nsresult getNameAtom(nsIAtom** aAtom) MOZ_OVERRIDE;
 #else
 #define TX_DECL_TOSTRING
 #define TX_DECL_GETNAMEATOM
 #endif
 
 #define TX_DECL_EXPR_BASE \
-    nsresult evaluate(txIEvalContext* aContext, txAExprResult** aResult); \
-    ResultType getReturnType(); \
-    bool isSensitiveTo(ContextSensitivity aContexts);
+    nsresult evaluate(txIEvalContext* aContext, txAExprResult** aResult) MOZ_OVERRIDE; \
+    ResultType getReturnType() MOZ_OVERRIDE; \
+    bool isSensitiveTo(ContextSensitivity aContexts) MOZ_OVERRIDE;
 
 #define TX_DECL_EXPR \
     TX_DECL_EXPR_BASE \
     TX_DECL_TOSTRING \
-    Expr* getSubExprAt(uint32_t aPos); \
-    void setSubExprAt(uint32_t aPos, Expr* aExpr);
+    Expr* getSubExprAt(uint32_t aPos) MOZ_OVERRIDE; \
+    void setSubExprAt(uint32_t aPos, Expr* aExpr) MOZ_OVERRIDE;
 
 #define TX_DECL_OPTIMIZABLE_EXPR \
     TX_DECL_EXPR \
-    ExprType getType();
-    
+    ExprType getType() MOZ_OVERRIDE;
 
 #define TX_DECL_FUNCTION \
     TX_DECL_GETNAMEATOM \
     TX_DECL_EXPR_BASE
 
 #define TX_IMPL_EXPR_STUBS_BASE(_class, _ReturnType)          \
 Expr::ResultType                                              \
 _class::getReturnType()                                       \
@@ -421,19 +420,19 @@ public:
 
 #ifdef TX_TO_STRING
     virtual void toString(nsAString& aDest) = 0;
 #endif
 };
 
 #define TX_DECL_NODE_TEST \
     TX_DECL_TOSTRING \
-    bool matches(const txXPathNode& aNode, txIMatchContext* aContext); \
-    double getDefaultPriority(); \
-    bool isSensitiveTo(Expr::ContextSensitivity aContext);
+    bool matches(const txXPathNode& aNode, txIMatchContext* aContext) MOZ_OVERRIDE; \
+    double getDefaultPriority() MOZ_OVERRIDE; \
+    bool isSensitiveTo(Expr::ContextSensitivity aContext) MOZ_OVERRIDE;
 
 /*
  * This class represents a NameTest as defined by the XPath spec
  */
 class txNameTest : public txNodeTest
 {
 public:
     /*
--- a/dom/xslt/xpath/txXPathObjectAdaptor.h
+++ b/dom/xslt/xpath/txXPathObjectAdaptor.h
@@ -22,17 +22,17 @@ public:
     {
         NS_ASSERTION(aValue,
                      "Don't create a txXPathObjectAdaptor if you don't have a "
                      "txAExprResult");
     }
 
     NS_DECL_ISUPPORTS
 
-    NS_IMETHODIMP_(txAExprResult*) GetResult()
+    NS_IMETHODIMP_(txAExprResult*) GetResult() MOZ_OVERRIDE
     {
         return mValue;
     }
 
 protected:
     txXPathObjectAdaptor() : mValue(nullptr)
     {
     }
--- a/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
+++ b/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
@@ -74,24 +74,24 @@ public:
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSIEXPATSINK
     NS_DECL_NSISTREAMLISTENER
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSIINTERFACEREQUESTOR
 
     // nsIContentSink
-    NS_IMETHOD WillParse(void) { return NS_OK; }
-    NS_IMETHOD DidBuildModel(bool aTerminated);
-    NS_IMETHOD WillInterrupt(void) { return NS_OK; }
-    NS_IMETHOD WillResume(void) { return NS_OK; }
-    NS_IMETHOD SetParser(nsParserBase* aParser) { return NS_OK; }
-    virtual void FlushPendingNotifications(mozFlushType aType) { }
-    NS_IMETHOD SetDocumentCharset(nsACString& aCharset) { return NS_OK; }
-    virtual nsISupports *GetTarget() { return nullptr; }
+    NS_IMETHOD WillParse(void) MOZ_OVERRIDE { return NS_OK; }
+    NS_IMETHOD DidBuildModel(bool aTerminated) MOZ_OVERRIDE;
+    NS_IMETHOD WillInterrupt(void) MOZ_OVERRIDE { return NS_OK; }
+    NS_IMETHOD WillResume(void) MOZ_OVERRIDE { return NS_OK; }
+    NS_IMETHOD SetParser(nsParserBase* aParser) MOZ_OVERRIDE { return NS_OK; }
+    virtual void FlushPendingNotifications(mozFlushType aType) MOZ_OVERRIDE { }
+    NS_IMETHOD SetDocumentCharset(nsACString& aCharset) MOZ_OVERRIDE { return NS_OK; }
+    virtual nsISupports *GetTarget() MOZ_OVERRIDE { return nullptr; }
 
 private:
     nsRefPtr<txStylesheetCompiler> mCompiler;
     nsCOMPtr<nsIStreamListener> mListener;
     bool mCheckedForXML;
 
 protected:
     ~txStylesheetSink() {}
--- a/dom/xslt/xslt/txXSLTPatterns.h
+++ b/dom/xslt/xslt/txXSLTPatterns.h
@@ -83,29 +83,29 @@ public:
      * other #toString() methods for Patterns.
      * @return the String representation of this Pattern.
      */
     virtual void toString(nsAString& aDest) = 0;
 #endif
 };
 
 #define TX_DECL_PATTERN_BASE \
-    bool matches(const txXPathNode& aNode, txIMatchContext* aContext); \
-    double getDefaultPriority(); \
-    virtual Expr* getSubExprAt(uint32_t aPos); \
-    virtual void setSubExprAt(uint32_t aPos, Expr* aExpr); \
-    virtual txPattern* getSubPatternAt(uint32_t aPos); \
-    virtual void setSubPatternAt(uint32_t aPos, txPattern* aPattern)
+    bool matches(const txXPathNode& aNode, txIMatchContext* aContext) MOZ_OVERRIDE; \
+    double getDefaultPriority() MOZ_OVERRIDE; \
+    virtual Expr* getSubExprAt(uint32_t aPos) MOZ_OVERRIDE; \
+    virtual void setSubExprAt(uint32_t aPos, Expr* aExpr) MOZ_OVERRIDE; \
+    virtual txPattern* getSubPatternAt(uint32_t aPos) MOZ_OVERRIDE; \
+    virtual void setSubPatternAt(uint32_t aPos, txPattern* aPattern) MOZ_OVERRIDE
 
 #ifndef TX_TO_STRING
 #define TX_DECL_PATTERN TX_DECL_PATTERN_BASE
 #else
 #define TX_DECL_PATTERN \
     TX_DECL_PATTERN_BASE; \
-    void toString(nsAString& aDest)
+    void toString(nsAString& aDest) MOZ_OVERRIDE
 #endif
 
 #define TX_IMPL_PATTERN_STUBS_NO_SUB_EXPR(_class)             \
 Expr*                                                         \
 _class::getSubExprAt(uint32_t aPos)                           \
 {                                                             \
     return nullptr;                                            \
 }                                                             \