Bug 1318335 - Use C++11's override and remove virtual where applicable in ipc/. draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Thu, 17 Nov 2016 15:12:09 +0200
changeset 440459 5c7afa221bd1baadbde44f619674a650a3702680
parent 440458 0441465938984a94145003f5f7f9e0838f289a9e
child 537371 e0a226bf2e60a42afc1981e0dcf52f94858e899f
push id36221
push userbmo:bpostelnicu@mozilla.com
push dateThu, 17 Nov 2016 15:02:35 +0000
bugs1318335
milestone53.0a1
Bug 1318335 - Use C++11's override and remove virtual where applicable in ipc/. 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
@@ -101,25 +101,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
@@ -80,23 +80,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 {
 
@@ -395,17 +395,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
@@ -592,17 +592,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 &&