Bug 1123890: Add MOZ_OVERRIDE annotations to overriding methods in dom/broadcastchannel. r=baku
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 21 Jan 2015 07:44:12 -0800
changeset 242431 985c472a8aaf41216eb1f4df8431ed4e70d2ac48
parent 242430 e16d14a4f54db740f9724c98dc466718c107a06c
child 242432 23a25f888164fa30d41dd6635f874378af660a93
push id7677
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 18:11:24 +0000
treeherdermozilla-aurora@f531d838c055 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1123890
milestone38.0a1
Bug 1123890: Add MOZ_OVERRIDE annotations to overriding methods in dom/broadcastchannel. r=baku
dom/broadcastchannel/BroadcastChannel.cpp
dom/broadcastchannel/BroadcastChannelChild.h
--- a/dom/broadcastchannel/BroadcastChannel.cpp
+++ b/dom/broadcastchannel/BroadcastChannel.cpp
@@ -182,17 +182,17 @@ public:
   PostMessageRunnable(BroadcastChannelChild* aActor,
                       BroadcastChannelMessage* aData)
     : mActor(aActor)
     , mData(aData)
   {
     MOZ_ASSERT(mActor);
   }
 
-  NS_IMETHODIMP Run()
+  NS_IMETHODIMP Run() MOZ_OVERRIDE
   {
     MOZ_ASSERT(mActor);
     if (mActor->IsActorDestroyed()) {
       return NS_OK;
     }
 
     ClonedMessageData message;
 
@@ -216,17 +216,17 @@ public:
         message.blobsChild().AppendElement(blobChild);
       }
     }
 
     mActor->SendPostMessage(message);
     return NS_OK;
   }
 
-  NS_IMETHODIMP Cancel()
+  NS_IMETHODIMP Cancel() MOZ_OVERRIDE
   {
     mActor = nullptr;
     return NS_OK;
   }
 
 private:
   ~PostMessageRunnable() {}
 
@@ -242,23 +242,23 @@ public:
   NS_DECL_ISUPPORTS
 
   explicit CloseRunnable(BroadcastChannel* aBC)
     : mBC(aBC)
   {
     MOZ_ASSERT(mBC);
   }
 
-  NS_IMETHODIMP Run()
+  NS_IMETHODIMP Run() MOZ_OVERRIDE
   {
     mBC->Shutdown();
     return NS_OK;
   }
 
-  NS_IMETHODIMP Cancel()
+  NS_IMETHODIMP Cancel() MOZ_OVERRIDE
   {
     mBC = nullptr;
     return NS_OK;
   }
 
 private:
   ~CloseRunnable() {}
 
@@ -273,26 +273,26 @@ public:
   NS_DECL_ISUPPORTS
 
   explicit TeardownRunnable(BroadcastChannelChild* aActor)
     : mActor(aActor)
   {
     MOZ_ASSERT(mActor);
   }
 
-  NS_IMETHODIMP Run()
+  NS_IMETHODIMP Run() MOZ_OVERRIDE
   {
     MOZ_ASSERT(mActor);
     if (!mActor->IsActorDestroyed()) {
       mActor->SendClose();
     }
     return NS_OK;
   }
 
-  NS_IMETHODIMP Cancel()
+  NS_IMETHODIMP Cancel() MOZ_OVERRIDE
   {
     mActor = nullptr;
     return NS_OK;
   }
 
 private:
   ~TeardownRunnable() {}
 
--- a/dom/broadcastchannel/BroadcastChannelChild.h
+++ b/dom/broadcastchannel/BroadcastChannelChild.h
@@ -37,17 +37,17 @@ public:
   }
 
 private:
   BroadcastChannelChild(const nsAString& aOrigin,
                         const nsAString& aChannel);
 
   ~BroadcastChannelChild();
 
-  void ActorDestroy(ActorDestroyReason aWhy);
+  virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
 
   // This raw pointer is actually the parent object.
   // It's set to null when the parent object is deleted.
   BroadcastChannel* mBC;
 
   nsString mOrigin;
   nsString mChannel;