Bug 1118612 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/promise; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 06 Jan 2015 23:51:59 -0500
changeset 235489 277f764e87ae6c77c7d50d6a9419438dc8e056be
parent 235488 a4c67bb878ff39c7d9ed3cdd57250a84c3db81f6
child 235490 a194a9a118f1fa7b60937cf36e9234bdc9474f22
push id366
push usercmanchester@mozilla.com
push dateThu, 08 Jan 2015 16:40:24 +0000
reviewersbaku
bugs1118612
milestone37.0a1
Bug 1118612 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/promise; r=baku
dom/promise/Promise.cpp
dom/promise/PromiseWorkerProxy.h
--- a/dom/promise/Promise.cpp
+++ b/dom/promise/Promise.cpp
@@ -783,23 +783,23 @@ public:
 
   AllResolveHandler(CountdownHolder* aHolder, uint32_t aIndex)
     : mCountdownHolder(aHolder), mIndex(aIndex)
   {
     MOZ_ASSERT(aHolder);
   }
 
   void
-  ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue)
+  ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) MOZ_OVERRIDE
   {
     mCountdownHolder->SetValue(mIndex, aValue);
   }
 
   void
-  RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue)
+  RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) MOZ_OVERRIDE
   {
     // Should never be attached to Promise as a reject handler.
     MOZ_ASSERT(false, "AllResolveHandler should never be attached to a Promise's reject handler!");
   }
 
 private:
   ~AllResolveHandler()
   {
--- a/dom/promise/PromiseWorkerProxy.h
+++ b/dom/promise/PromiseWorkerProxy.h
@@ -57,17 +57,17 @@ class WorkerPrivate;
 // thread.
 
 class PromiseWorkerProxy : public PromiseNativeHandler,
                            public workers::WorkerFeature
 {
   friend class PromiseWorkerProxyRunnable;
 
   // This overrides the non-threadsafe refcounting in PromiseNativeHandler.
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(PromiseWorkerProxy)
+  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(PromiseWorkerProxy, MOZ_OVERRIDE)
 
 public:
   static already_AddRefed<PromiseWorkerProxy>
   Create(workers::WorkerPrivate* aWorkerPrivate,
          Promise* aWorkerPromise,
          const JSStructuredCloneCallbacks* aCallbacks = nullptr);
 
   workers::WorkerPrivate* GetWorkerPrivate() const;