Bug 1318335 - Use C++11's override and remove virtual where applicable in ipc/. r=billm
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Thu, 17 Nov 2016 15:12:09 +0200
changeset 324601 6deceff197dc41aac40663be22dab6c698db1eb8
parent 324600 e8582a4033dcc63a0fbc529586773166fb43f9ef
child 324602 ca8ed6bab9f29504d4fbcdd8124df37878374b4f
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersbillm
bugs1318335
milestone53.0a1
Bug 1318335 - Use C++11's override and remove virtual where applicable in ipc/. r=billm MozReview-Commit-ID: 2Ae0htgmM7T
ipc/contentproc/plugin-container.cpp
ipc/glue/BackgroundChildImpl.cpp
ipc/glue/BackgroundParentImpl.cpp
--- a/ipc/contentproc/plugin-container.cpp
+++ b/ipc/contentproc/plugin-container.cpp
@@ -37,25 +37,25 @@ public:
         return true;
     }
 };
 #endif
 
 #if defined(XP_MACOSX) && defined(MOZ_GMP_SANDBOX)
 class MacSandboxStarter : public mozilla::gmp::SandboxStarter {
 public:
-    virtual bool Start(const char *aLibPath) override {
+    bool Start(const char *aLibPath) override {
       std::string err;
       bool rv = mozilla::StartMacSandbox(mInfo, err);
       if (!rv) {
         fprintf(stderr, "sandbox_init() failed! Error \"%s\"\n", err.c_str());
       }
       return rv;
     }
-    virtual void SetSandboxInfo(MacSandboxInfo* aSandboxInfo) override {
+    void SetSandboxInfo(MacSandboxInfo* aSandboxInfo) override {
       mInfo = *aSandboxInfo;
     }
 private:
   MacSandboxInfo mInfo;
 };
 #endif
 
 mozilla::gmp::SandboxStarter*
--- a/ipc/glue/BackgroundChildImpl.cpp
+++ b/ipc/glue/BackgroundChildImpl.cpp
@@ -47,23 +47,23 @@ class TestChild final : public mozilla::
 
   explicit TestChild(const nsCString& aTestArg)
     : mTestArg(aTestArg)
   {
     MOZ_COUNT_CTOR(TestChild);
   }
 
 protected:
-  ~TestChild()
+  ~TestChild() override
   {
     MOZ_COUNT_DTOR(TestChild);
   }
 
 public:
-  virtual mozilla::ipc::IPCResult
+  mozilla::ipc::IPCResult
   Recv__delete__(const nsCString& aTestArg) override;
 };
 
 } // namespace
 
 namespace mozilla {
 namespace ipc {
 
--- a/ipc/glue/BackgroundParentImpl.cpp
+++ b/ipc/glue/BackgroundParentImpl.cpp
@@ -79,23 +79,23 @@ class TestParent final : public mozilla:
   friend class mozilla::ipc::BackgroundParentImpl;
 
   TestParent()
   {
     MOZ_COUNT_CTOR(TestParent);
   }
 
 protected:
-  ~TestParent()
+  ~TestParent() override
   {
     MOZ_COUNT_DTOR(TestParent);
   }
 
 public:
-  virtual void
+  void
   ActorDestroy(ActorDestroyReason aWhy) override;
 };
 
 } // namespace
 
 namespace mozilla {
 namespace ipc {
 
@@ -394,17 +394,17 @@ public:
     IPC::Principal principal;
     if (!mActor->Init(principal, mFilter)) {
       MOZ_CRASH("UDPSocketCallback - failed init");
     }
     return NS_OK;
   }
 
 private:
-  ~InitUDPSocketParentCallback() = default;
+  ~InitUDPSocketParentCallback() override = default;
 
   RefPtr<UDPSocketParent> mActor;
   nsCString mFilter;
 };
 
 } // namespace
 
 auto
@@ -591,17 +591,17 @@ public:
     if (!mActor->Destroyed()) {
       mActor->Start();
     }
 
     return NS_OK;
   }
 
 private:
-  ~CheckPermissionRunnable()
+  ~CheckPermissionRunnable() override
   {
      NS_ProxyRelease(mBackgroundEventTarget, mActor.forget());
   }
 
   bool
   CheckPermission()
   {
     if (mPermissionCheckType == FileSystemBase::ePermissionCheckByTestingPref &&