bug 1133075 - add more MOZ_OVERRIDE r=froydnj, waldo, jrmuizel
authorTrevor Saunders <trev.saunders@gmail.com>
Thu, 15 Jan 2015 20:04:42 -0500
changeset 229734 bf0a30e5256cd3f75782686954fddfc31348fcf2
parent 229733 30d3e9381a50e33ca1721c34f6ef400a162214e0
child 229735 22cb52f4cab40be582abedebf8fe0c3a1beaea23
push id28295
push usercbook@mozilla.com
push dateThu, 19 Feb 2015 14:42:12 +0000
treeherdermozilla-central@d88e65d32c53 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj, waldo, jrmuizel
bugs1133075
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 1133075 - add more MOZ_OVERRIDE r=froydnj, waldo, jrmuizel
gfx/2d/2D.h
gfx/2d/GenericRefCounted.h
ipc/chromium/src/base/file_descriptor_shuffle.h
ipc/chromium/src/base/message_loop.h
ipc/chromium/src/base/message_pump_libevent.h
ipc/chromium/src/chrome/common/ipc_channel.h
ipc/glue/MessageChannel.h
js/src/jsfriendapi.h
parser/htmlparser/nsIParser.h
xpcom/base/ClearOnShutdown.h
xpcom/glue/nsIInterfaceRequestorUtils.h
--- a/gfx/2d/2D.h
+++ b/gfx/2d/2D.h
@@ -189,17 +189,20 @@ class ColorPattern : public Pattern
 {
 public:
   // Explicit because consumers should generally use ToDeviceColor when
   // creating a ColorPattern.
   explicit ColorPattern(const Color &aColor)
     : mColor(aColor)
   {}
 
-  virtual PatternType GetType() const { return PatternType::COLOR; }
+  virtual PatternType GetType() const MOZ_OVERRIDE
+  {
+    return PatternType::COLOR;
+  }
 
   Color mColor;
 };
 
 /**
  * This class is used for Linear Gradient Patterns, the gradient stops are
  * stored in a separate object and are backend dependent. This class itself
  * may be used on the stack.
@@ -214,17 +217,20 @@ public:
                         const Matrix &aMatrix = Matrix())
     : mBegin(aBegin)
     , mEnd(aEnd)
     , mStops(aStops)
     , mMatrix(aMatrix)
   {
   }
 
-  virtual PatternType GetType() const { return PatternType::LINEAR_GRADIENT; }
+  virtual PatternType GetType() const MOZ_OVERRIDE
+  {
+    return PatternType::LINEAR_GRADIENT;
+  }
 
   Point mBegin;                 //!< Start of the linear gradient
   Point mEnd;                   /**< End of the linear gradient - NOTE: In the case
                                      of a zero length gradient it will act as the
                                      color of the last stop. */
   RefPtr<GradientStops> mStops; /**< GradientStops object for this gradient, this
                                      should match the backend type of the draw
                                      target this pattern will be used with. */
@@ -251,17 +257,20 @@ public:
     , mCenter2(aCenter2)
     , mRadius1(aRadius1)
     , mRadius2(aRadius2)
     , mStops(aStops)
     , mMatrix(aMatrix)
   {
   }
 
-  virtual PatternType GetType() const { return PatternType::RADIAL_GRADIENT; }
+  virtual PatternType GetType() const MOZ_OVERRIDE
+  {
+    return PatternType::RADIAL_GRADIENT;
+  }
 
   Point mCenter1; //!< Center of the inner (focal) circle.
   Point mCenter2; //!< Center of the outer circle.
   Float mRadius1; //!< Radius of the inner (focal) circle.
   Float mRadius2; //!< Radius of the outer circle.
   RefPtr<GradientStops> mStops; /**< GradientStops object for this gradient, this
                                      should match the backend type of the draw target
                                      this pattern will be used with. */
@@ -281,17 +290,20 @@ public:
                  const IntRect &aSamplingRect = IntRect())
     : mSurface(aSourceSurface)
     , mExtendMode(aExtendMode)
     , mFilter(aFilter)
     , mMatrix(aMatrix)
     , mSamplingRect(aSamplingRect)
   {}
 
-  virtual PatternType GetType() const { return PatternType::SURFACE; }
+  virtual PatternType GetType() const MOZ_OVERRIDE
+  {
+    return PatternType::SURFACE;
+  }
 
   RefPtr<SourceSurface> mSurface; //!< Surface to use for drawing
   ExtendMode mExtendMode;         /**< This determines how the image is extended
                                        outside the bounds of the image */
   Filter mFilter;                 //!< Resampling filter for resampling the image.
   Matrix mMatrix;                 //!< Transforms the pattern into user space
 
   IntRect mSamplingRect;          /**< Rect that must not be sampled outside of,
@@ -378,17 +390,17 @@ public:
   };
 
   enum MapType {
     READ,
     WRITE,
     READ_WRITE
   };
 
-  virtual SurfaceType GetType() const { return SurfaceType::DATA; }
+  virtual SurfaceType GetType() const MOZ_OVERRIDE { return SurfaceType::DATA; }
   /** @deprecated
    * Get the raw bitmap data of the surface.
    * Can return null if there was OOM allocating surface data.
    */
   virtual uint8_t *GetData() = 0;
 
   /** @deprecated
    * Stride of the surface, distance in bytes between the start of the image
@@ -410,17 +422,17 @@ public:
     MOZ_ASSERT(mIsMapped);
     mIsMapped = false;
   }
 
   /**
    * Returns a DataSourceSurface with the same data as this one, but
    * guaranteed to have surface->GetType() == SurfaceType::DATA.
    */
-  virtual TemporaryRef<DataSourceSurface> GetDataSurface();
+  virtual TemporaryRef<DataSourceSurface> GetDataSurface() MOZ_OVERRIDE;
 
 protected:
   bool mIsMapped;
 };
 
 /** This is an abstract object that accepts path segments. */
 class PathSink : public RefCounted<PathSink>
 {
--- a/gfx/2d/GenericRefCounted.h
+++ b/gfx/2d/GenericRefCounted.h
@@ -52,31 +52,31 @@ class GenericRefCounted : public Generic
   protected:
     GenericRefCounted() : refCnt(0) { }
 
     virtual ~GenericRefCounted() {
       MOZ_ASSERT(refCnt == detail::DEAD);
     }
 
   public:
-    virtual void AddRef() {
+    virtual void AddRef() MOZ_OVERRIDE {
       // Note: this method must be thread safe for GenericAtomicRefCounted.
       MOZ_ASSERT(int32_t(refCnt) >= 0);
 #ifndef MOZ_REFCOUNTED_LEAK_CHECKING
       ++refCnt;
 #else
       const char* type = typeName();
       uint32_t size = typeSize();
       const void* ptr = this;
       MozRefCountType cnt = ++refCnt;
       detail::RefCountLogger::logAddRef(ptr, cnt, type, size);
 #endif
     }
 
-    virtual void Release() {
+    virtual void Release() MOZ_OVERRIDE {
       // Note: this method must be thread safe for GenericAtomicRefCounted.
       MOZ_ASSERT(int32_t(refCnt) > 0);
 #ifndef MOZ_REFCOUNTED_LEAK_CHECKING
       MozRefCountType cnt = --refCnt;
 #else
       const char* type = typeName();
       const void* ptr = this;
       MozRefCountType cnt = --refCnt;
--- a/ipc/chromium/src/base/file_descriptor_shuffle.h
+++ b/ipc/chromium/src/base/file_descriptor_shuffle.h
@@ -37,19 +37,19 @@ class InjectionDelegate {
   virtual bool Move(int src, int dest) = 0;
   // Delete an element of the domain.
   virtual void Close(int fd) = 0;
 };
 
 // An implementation of the InjectionDelegate interface using the file
 // descriptor table of the current process as the domain.
 class FileDescriptorTableInjection : public InjectionDelegate {
-  bool Duplicate(int* result, int fd);
-  bool Move(int src, int dest);
-  void Close(int fd);
+  virtual bool Duplicate(int* result, int fd) MOZ_OVERRIDE;
+  virtual bool Move(int src, int dest) MOZ_OVERRIDE;
+  virtual void Close(int fd) MOZ_OVERRIDE;
 };
 
 // A single arc of the directed graph which describes an injective multimapping.
 struct InjectionArc {
   InjectionArc(int in_source, int in_dest, bool in_close)
       : source(in_source),
         dest(in_dest),
         close(in_close) {
--- a/ipc/chromium/src/base/message_loop.h
+++ b/ipc/chromium/src/base/message_loop.h
@@ -171,17 +171,17 @@ public:
   // run loop you are quiting, so be careful!
   //
   void Quit();
 
   // Invokes Quit on the current MessageLoop when run.  Useful to schedule an
   // arbitrary MessageLoop to Quit.
   class QuitTask : public Task {
    public:
-    virtual void Run() {
+    virtual void Run() MOZ_OVERRIDE {
       MessageLoop::current()->Quit();
     }
   };
 
   // A MessageLoop has a particular type, which indicates the set of
   // asynchronous events it may process in addition to tasks and timers.
   //
   // TYPE_DEFAULT
@@ -391,19 +391,19 @@ public:
   // true if some work was done.
   bool DeletePendingTasks();
 
   // Post a task to our incomming queue.
   void PostTask_Helper(const tracked_objects::Location& from_here, Task* task,
                        int delay_ms, bool nestable);
 
   // base::MessagePump::Delegate methods:
-  virtual bool DoWork();
-  virtual bool DoDelayedWork(base::TimeTicks* next_delayed_work_time);
-  virtual bool DoIdleWork();
+  virtual bool DoWork() MOZ_OVERRIDE;
+  virtual bool DoDelayedWork(base::TimeTicks* next_delayed_work_time) MOZ_OVERRIDE;
+  virtual bool DoIdleWork() MOZ_OVERRIDE;
 
   Type type_;
   int32_t id_;
 
   // A list of tasks that need to be processed by this instance.  Note that
   // this queue is only accessed (push/pop) by our current thread.
   TaskQueue work_queue_;
 
--- a/ipc/chromium/src/base/message_pump_libevent.h
+++ b/ipc/chromium/src/base/message_pump_libevent.h
@@ -128,20 +128,20 @@ class MessagePumpLibevent : public Messa
   // SignalEvent object which can be used to manage the lifetime of
   // this event.  Returns true on success.
   bool CatchSignal(int sig,
                    SignalEvent* sigevent,
                    SignalWatcher* delegate);
 
 
   // MessagePump methods:
-  virtual void Run(Delegate* delegate);
-  virtual void Quit();
-  virtual void ScheduleWork();
-  virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time);
+  virtual void Run(Delegate* delegate) MOZ_OVERRIDE;
+  virtual void Quit() MOZ_OVERRIDE;
+  virtual void ScheduleWork() MOZ_OVERRIDE;
+  virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) MOZ_OVERRIDE;
 
  protected:
 
   virtual ~MessagePumpLibevent();
 
  private:
 
   // Risky part of constructor.  Returns true on success.
@@ -199,19 +199,19 @@ public:
 
 protected:
   /**
    * OnError will be called when |read| returns error. Derived class should
    * implement this function to handle error cases when needed.
    */
   virtual void OnError() {}
   virtual void OnLineRead(int aFd, nsDependentCSubstring& aMessage) = 0;
-  virtual void OnFileCanWriteWithoutBlocking(int /* aFd */) {}
+  virtual void OnFileCanWriteWithoutBlocking(int /* aFd */) MOZ_OVERRIDE {}
 private:
-  virtual void OnFileCanReadWithoutBlocking(int aFd) MOZ_FINAL;
+  virtual void OnFileCanReadWithoutBlocking(int aFd) MOZ_FINAL MOZ_OVERRIDE;
 
   nsAutoPtr<char> mReceiveBuffer;
   int mReceivedIndex;
   int mBufferSize;
   char mTerminator;
 };
 }  // namespace base
 
--- a/ipc/chromium/src/chrome/common/ipc_channel.h
+++ b/ipc/chromium/src/chrome/common/ipc_channel.h
@@ -93,17 +93,17 @@ class Channel : public Message::Sender {
 
   // Send a message over the Channel to the listener on the other end.
   //
   // |message| must be allocated using operator new.  This object will be
   // deleted once the contents of the Message have been sent.
   //
   // If you Send() a message on a Close()'d channel, we delete the message
   // immediately.
-  virtual bool Send(Message* message);
+  virtual bool Send(Message* message) MOZ_OVERRIDE;
 
   // Unsound_IsClosed() and Unsound_NumQueuedMessages() are safe to call from
   // any thread, but the value returned may be out of date, because we don't
   // use any synchronization when reading or writing it.
   bool Unsound_IsClosed() const;
   uint32_t Unsound_NumQueuedMessages() const;
 
 #if defined(OS_POSIX)
--- a/ipc/glue/MessageChannel.h
+++ b/ipc/glue/MessageChannel.h
@@ -446,17 +446,17 @@ class MessageChannel : HasResultCodes
     // Wrap an existing task which can be cancelled at any time
     // without the wrapper's knowledge.
     class DequeueTask : public Task
     {
       public:
         explicit DequeueTask(RefCountedTask* aTask)
           : mTask(aTask)
         { }
-        void Run() { mTask->Run(); }
+        void Run() MOZ_OVERRIDE { mTask->Run(); }
 
       private:
         nsRefPtr<RefCountedTask> mTask;
     };
 
   private:
     mozilla::WeakPtr<MessageListener> mListener;
     ChannelState mChannelState;
--- a/js/src/jsfriendapi.h
+++ b/js/src/jsfriendapi.h
@@ -1105,41 +1105,41 @@ typedef enum NukeReferencesToWindow {
  * These filters are designed to be ephemeral stack classes, and thus don't
  * do any rooting or holding of their members.
  */
 struct CompartmentFilter {
     virtual bool match(JSCompartment *c) const = 0;
 };
 
 struct AllCompartments : public CompartmentFilter {
-    virtual bool match(JSCompartment *c) const { return true; }
+    virtual bool match(JSCompartment *c) const MOZ_OVERRIDE { return true; }
 };
 
 struct ContentCompartmentsOnly : public CompartmentFilter {
-    virtual bool match(JSCompartment *c) const {
+    virtual bool match(JSCompartment *c) const MOZ_OVERRIDE {
         return !IsSystemCompartment(c);
     }
 };
 
 struct ChromeCompartmentsOnly : public CompartmentFilter {
-    virtual bool match(JSCompartment *c) const {
+    virtual bool match(JSCompartment *c) const MOZ_OVERRIDE {
         return IsSystemCompartment(c);
     }
 };
 
 struct SingleCompartment : public CompartmentFilter {
     JSCompartment *ours;
     explicit SingleCompartment(JSCompartment *c) : ours(c) {}
-    virtual bool match(JSCompartment *c) const { return c == ours; }
+    virtual bool match(JSCompartment *c) const MOZ_OVERRIDE { return c == ours; }
 };
 
 struct CompartmentsWithPrincipals : public CompartmentFilter {
     JSPrincipals *principals;
     explicit CompartmentsWithPrincipals(JSPrincipals *p) : principals(p) {}
-    virtual bool match(JSCompartment *c) const {
+    virtual bool match(JSCompartment *c) const MOZ_OVERRIDE {
         return JS_GetCompartmentPrincipals(c) == principals;
     }
 };
 
 extern JS_FRIEND_API(bool)
 NukeCrossCompartmentWrappers(JSContext* cx,
                              const CompartmentFilter& sourceFilter,
                              const CompartmentFilter& targetFilter,
--- a/parser/htmlparser/nsIParser.h
+++ b/parser/htmlparser/nsIParser.h
@@ -115,17 +115,17 @@ class nsIParser : public nsParserBase {
     NS_IMETHOD_(void) GetDocumentCharset(nsACString& oCharset, int32_t& oSource)=0;
 
     /** 
      * Get the channel associated with this parser
      * @update harishd,gagan 07/17/01
      * @param aChannel out param that will contain the result
      * @return NS_OK if successful
      */
-    NS_IMETHOD GetChannel(nsIChannel** aChannel) = 0;
+    NS_IMETHOD GetChannel(nsIChannel** aChannel) MOZ_OVERRIDE = 0;
 
     /** 
      * Get the DTD associated with this parser
      * @update vidur 9/29/99
      * @param aDTD out param that will contain the result
      * @return NS_OK if successful, NS_ERROR_FAILURE for runtime error
      */
     NS_IMETHOD GetDTD(nsIDTD** aDTD) = 0;
@@ -158,17 +158,17 @@ class nsIParser : public nsParserBase {
     // the parsing engine.
     NS_IMETHOD_(void) UnblockParser() = 0;
 
     /**
      * Asynchronously continues parsing.
      */
     NS_IMETHOD_(void) ContinueInterruptedParsingAsync() = 0;
 
-    NS_IMETHOD_(bool) IsParserEnabled() = 0;
+    NS_IMETHOD_(bool) IsParserEnabled() MOZ_OVERRIDE = 0;
     NS_IMETHOD_(bool) IsComplete() = 0;
     
     NS_IMETHOD Parse(nsIURI* aURL,
                      nsIRequestObserver* aListener = nullptr,
                      void* aKey = 0,
                      nsDTDMode aMode = eDTDMode_autodetect) = 0;
 
     NS_IMETHOD Terminate(void) = 0;
--- a/xpcom/base/ClearOnShutdown.h
+++ b/xpcom/base/ClearOnShutdown.h
@@ -51,17 +51,17 @@ template<class SmartPtr>
 class PointerClearer : public ShutdownObserver
 {
 public:
   explicit PointerClearer(SmartPtr* aPtr)
     : mPtr(aPtr)
   {
   }
 
-  virtual void Shutdown()
+  virtual void Shutdown() MOZ_OVERRIDE
   {
     if (mPtr) {
       *mPtr = nullptr;
     }
   }
 
 private:
   SmartPtr* mPtr;
--- a/xpcom/glue/nsIInterfaceRequestorUtils.h
+++ b/xpcom/glue/nsIInterfaceRequestorUtils.h
@@ -26,17 +26,18 @@ class MOZ_STACK_CLASS nsGetInterface : p
 {
 public:
   nsGetInterface(nsISupports* aSource, nsresult* aError)
     : mSource(aSource)
     , mErrorPtr(aError)
   {
   }
 
-  virtual nsresult NS_FASTCALL operator()(const nsIID&, void**) const;
+  virtual nsresult NS_FASTCALL operator()(const nsIID&, void**) const
+    MOZ_OVERRIDE;
 
 private:
   nsISupports* MOZ_NON_OWNING_REF mSource;
   nsresult* mErrorPtr;
 };
 
 inline const nsGetInterface
 do_GetInterface(nsISupports* aSource, nsresult* aError = 0)