Bug 1317241 - Use C++11's override and remove virtual where applicable in dom/ draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Tue, 15 Nov 2016 13:09:07 +0200
changeset 439083 ea674f2b690599e9358a97a455a7831a798d909b
parent 439081 1e52820a97ba3d9901de5c8a5e1da59e56099bc9
child 537072 7c08e56765213938b7b6d43574cd21ffec2d7cf6
push id35901
push userbmo:bpostelnicu@mozilla.com
push dateTue, 15 Nov 2016 11:09:39 +0000
bugs1317241
milestone53.0a1
Bug 1317241 - Use C++11's override and remove virtual where applicable in dom/ MozReview-Commit-ID: 8jUAehd1odv
dom/asmjscache/AsmJSCache.cpp
dom/base/nsFrameMessageManager.cpp
dom/base/nsGlobalWindow.cpp
dom/base/nsObjectLoadingContent.cpp
dom/browser-element/BrowserElementAudioChannel.cpp
dom/events/EventStateManager.cpp
dom/html/PluginDocument.cpp
dom/indexedDB/ActorsParent.cpp
dom/ipc/Blob.cpp
dom/ipc/ContentChild.cpp
dom/ipc/ProcessHangMonitor.cpp
dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp
dom/media/gmp-plugin/gmp-test-decryptor.cpp
dom/media/gmp/GMPLoader.cpp
dom/media/gmp/widevine-adapter/WidevineDecryptor.cpp
dom/media/webspeech/synth/cocoa/OSXSpeechSynthesizerService.mm
dom/plugins/base/nsNPAPIPlugin.cpp
dom/plugins/base/nsPluginHost.cpp
--- a/dom/asmjscache/AsmJSCache.cpp
+++ b/dom/asmjscache/AsmJSCache.cpp
@@ -245,17 +245,17 @@ public:
   FileDescriptorHolder()
   : mQuotaObject(nullptr),
     mFileSize(INT64_MIN),
     mFileDesc(nullptr),
     mFileMap(nullptr),
     mMappedMemory(nullptr)
   { }
 
-  ~FileDescriptorHolder()
+  ~FileDescriptorHolder() override
   {
     // These resources should have already been released by Finish().
     MOZ_ASSERT(!mQuotaObject);
     MOZ_ASSERT(!mMappedMemory);
     MOZ_ASSERT(!mFileMap);
     MOZ_ASSERT(!mFileDesc);
   }
 
@@ -359,17 +359,17 @@ public:
     mOpened(false)
   {
     MOZ_ASSERT(XRE_IsParentProcess());
     AssertIsOnOwningThread();
     MOZ_COUNT_CTOR(ParentRunnable);
   }
 
 private:
-  ~ParentRunnable()
+  ~ParentRunnable() override
   {
     MOZ_ASSERT(mState == eFinished);
     MOZ_ASSERT(!mDirectoryLock);
     MOZ_ASSERT(mActorDestroyed);
     MOZ_COUNT_DTOR(ParentRunnable);
   }
 
   bool
@@ -504,20 +504,20 @@ private:
     nsresult rv = qm->IOThread()->Dispatch(this, NS_DISPATCH_NORMAL);
     if (NS_FAILED(rv)) {
       FailOnNonOwningThread();
       return;
     }
   }
 
   // OpenDirectoryListener overrides.
-  virtual void
+  void
   DirectoryLockAcquired(DirectoryLock* aLock) override;
 
-  virtual void
+  void
   DirectoryLockFailed() override;
 
   // IPDL methods.
   bool
   Recv__delete__(const JS::AsmJSCacheResult& aResult) override
   {
     AssertIsOnOwningThread();
     MOZ_ASSERT(mState != eFinished);
@@ -1271,17 +1271,17 @@ public:
   void Cleanup()
   {
 #ifdef DEBUG
     NoteActorDestroyed();
 #endif
   }
 
 private:
-  ~ChildRunnable()
+  ~ChildRunnable() override
   {
     MOZ_ASSERT(!mWaiting, "Shouldn't be destroyed while thread is waiting");
     MOZ_ASSERT(!mOpened);
     MOZ_ASSERT(mState == eFinished);
     MOZ_ASSERT(mActorDestroyed);
     MOZ_COUNT_DTOR(ChildRunnable);
   }
 
@@ -1708,44 +1708,44 @@ CloseEntryForWrite(size_t aSize,
                     childRunnable->MappedMemory(),
                     childRunnable->FileSize()) == PR_SUCCESS) {
     *(AsmJSCookieType*)childRunnable->MappedMemory() = sAsmJSCookie;
   }
 }
 
 class Client : public quota::Client
 {
-  ~Client() = default;
+  ~Client() override = default;
 
 public:
   NS_IMETHOD_(MozExternalRefCountType)
   AddRef() override;
 
   NS_IMETHOD_(MozExternalRefCountType)
   Release() override;
 
-  virtual Type
+  Type
   GetType() override
   {
     return ASMJS;
   }
 
-  virtual nsresult
+  nsresult
   InitOrigin(PersistenceType aPersistenceType,
              const nsACString& aGroup,
              const nsACString& aOrigin,
              UsageInfo* aUsageInfo) override
   {
     if (!aUsageInfo) {
       return NS_OK;
     }
     return GetUsageForOrigin(aPersistenceType, aGroup, aOrigin, aUsageInfo);
   }
 
-  virtual nsresult
+  nsresult
   GetUsageForOrigin(PersistenceType aPersistenceType,
                     const nsACString& aGroup,
                     const nsACString& aOrigin,
                     UsageInfo* aUsageInfo) override
   {
     QuotaManager* qm = QuotaManager::Get();
     MOZ_ASSERT(qm, "We were being called by the QuotaManager");
 
@@ -1785,43 +1785,43 @@ public:
       // usage which represents implicit storage allocation.
       aUsageInfo->AppendToDatabaseUsage(uint64_t(fileSize));
     }
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
-  virtual void
+  void
   OnOriginClearCompleted(PersistenceType aPersistenceType,
                          const nsACString& aOrigin)
                          override
   { }
 
-  virtual void
+  void
   ReleaseIOThreadObjects() override
   { }
 
-  virtual void
+  void
   AbortOperations(const nsACString& aOrigin) override
   { }
 
-  virtual void
+  void
   AbortOperationsForProcess(ContentParentId aContentParentId) override
   { }
 
-  virtual void
+  void
   StartIdleMaintenance() override
   { }
 
-  virtual void
+  void
   StopIdleMaintenance() override
   { }
 
-  virtual void
+  void
   ShutdownWorkThreads() override
   { }
 
 private:
   nsAutoRefCnt mRefCnt;
   NS_DECL_OWNINGTHREAD
 };
 
--- a/dom/base/nsFrameMessageManager.cpp
+++ b/dom/base/nsFrameMessageManager.cpp
@@ -1936,35 +1936,35 @@ public:
  */
 class SameParentProcessMessageManagerCallback : public MessageManagerCallback
 {
 public:
   SameParentProcessMessageManagerCallback()
   {
     MOZ_COUNT_CTOR(SameParentProcessMessageManagerCallback);
   }
-  virtual ~SameParentProcessMessageManagerCallback()
+  ~SameParentProcessMessageManagerCallback() override
   {
     MOZ_COUNT_DTOR(SameParentProcessMessageManagerCallback);
   }
 
-  virtual bool DoLoadMessageManagerScript(const nsAString& aURL,
-                                          bool aRunInGlobalScope) override
+  bool DoLoadMessageManagerScript(const nsAString& aURL,
+                                  bool aRunInGlobalScope) override
   {
     ProcessGlobal* global = ProcessGlobal::Get();
     MOZ_ASSERT(!aRunInGlobalScope);
     global->LoadScript(aURL);
     return true;
   }
 
-  virtual nsresult DoSendAsyncMessage(JSContext* aCx,
-                                      const nsAString& aMessage,
-                                      StructuredCloneData& aData,
-                                      JS::Handle<JSObject *> aCpows,
-                                      nsIPrincipal* aPrincipal) override
+  nsresult DoSendAsyncMessage(JSContext* aCx,
+                              const nsAString& aMessage,
+                              StructuredCloneData& aData,
+                              JS::Handle<JSObject *> aCpows,
+                              nsIPrincipal* aPrincipal) override
   {
     JS::RootingContext* rcx = JS::RootingContext::get(aCx);
     RefPtr<nsAsyncMessageToSameProcessChild> ev =
       new nsAsyncMessageToSameProcessChild(rcx, aCpows);
 
     nsresult rv = ev->Init(aMessage, aData, aPrincipal);
     if (NS_FAILED(rv)) {
       return rv;
@@ -1989,17 +1989,17 @@ public:
   }
 
   bool CheckAppHasPermission(const nsAString& aPermission) override
   {
     // In a single-process scenario, the child always has all capabilities.
     return true;
   }
 
-  virtual bool CheckAppHasStatus(unsigned short aStatus) override
+  bool CheckAppHasStatus(unsigned short aStatus) override
   {
     // In a single-process scenario, the child always has all capabilities.
     return true;
   }
 };
 
 
 /**
@@ -2007,28 +2007,28 @@ public:
  */
 class ChildProcessMessageManagerCallback : public MessageManagerCallback
 {
 public:
   ChildProcessMessageManagerCallback()
   {
     MOZ_COUNT_CTOR(ChildProcessMessageManagerCallback);
   }
-  virtual ~ChildProcessMessageManagerCallback()
+  ~ChildProcessMessageManagerCallback() override
   {
     MOZ_COUNT_DTOR(ChildProcessMessageManagerCallback);
   }
 
-  virtual bool DoSendBlockingMessage(JSContext* aCx,
-                                     const nsAString& aMessage,
-                                     StructuredCloneData& aData,
-                                     JS::Handle<JSObject *> aCpows,
-                                     nsIPrincipal* aPrincipal,
-                                     nsTArray<StructuredCloneData>* aRetVal,
-                                     bool aIsSync) override
+  bool DoSendBlockingMessage(JSContext* aCx,
+                             const nsAString& aMessage,
+                             StructuredCloneData& aData,
+                             JS::Handle<JSObject *> aCpows,
+                             nsIPrincipal* aPrincipal,
+                             nsTArray<StructuredCloneData>* aRetVal,
+                             bool aIsSync) override
   {
     mozilla::dom::ContentChild* cc =
       mozilla::dom::ContentChild::GetSingleton();
     if (!cc) {
       return true;
     }
     ClonedMessageData data;
     if (!BuildClonedMessageDataForChild(cc, aData, data)) {
@@ -2041,21 +2041,21 @@ public:
     if (aIsSync) {
       return cc->SendSyncMessage(PromiseFlatString(aMessage), data, cpows,
                                  IPC::Principal(aPrincipal), aRetVal);
     }
     return cc->SendRpcMessage(PromiseFlatString(aMessage), data, cpows,
                               IPC::Principal(aPrincipal), aRetVal);
   }
 
-  virtual nsresult DoSendAsyncMessage(JSContext* aCx,
-                                      const nsAString& aMessage,
-                                      StructuredCloneData& aData,
-                                      JS::Handle<JSObject *> aCpows,
-                                      nsIPrincipal* aPrincipal) override
+  nsresult DoSendAsyncMessage(JSContext* aCx,
+                              const nsAString& aMessage,
+                              StructuredCloneData& aData,
+                              JS::Handle<JSObject *> aCpows,
+                              nsIPrincipal* aPrincipal) override
   {
     mozilla::dom::ContentChild* cc =
       mozilla::dom::ContentChild::GetSingleton();
     if (!cc) {
       return NS_OK;
     }
     ClonedMessageData data;
     if (!BuildClonedMessageDataForChild(cc, aData, data)) {
@@ -2078,17 +2078,17 @@ public:
 class nsAsyncMessageToSameProcessParent : public nsSameProcessAsyncMessageBase,
                                           public SameProcessMessageQueue::Runnable
 {
 public:
   nsAsyncMessageToSameProcessParent(JS::RootingContext* aRootingCx,
                                     JS::Handle<JSObject*> aCpows)
     : nsSameProcessAsyncMessageBase(aRootingCx, aCpows)
   { }
-  virtual nsresult HandleMessage() override
+  nsresult HandleMessage() override
   {
     nsFrameMessageManager* ppm = nsFrameMessageManager::sSameProcessParentManager;
     ReceiveMessage(static_cast<nsIContentFrameMessageManager*>(ppm), nullptr, ppm);
     return NS_OK;
   }
 };
 
 /**
@@ -2096,46 +2096,46 @@ public:
  */
 class SameChildProcessMessageManagerCallback : public MessageManagerCallback
 {
 public:
   SameChildProcessMessageManagerCallback()
   {
     MOZ_COUNT_CTOR(SameChildProcessMessageManagerCallback);
   }
-  virtual ~SameChildProcessMessageManagerCallback()
+  ~SameChildProcessMessageManagerCallback() override
   {
     MOZ_COUNT_DTOR(SameChildProcessMessageManagerCallback);
   }
 
-  virtual bool DoSendBlockingMessage(JSContext* aCx,
-                                     const nsAString& aMessage,
-                                     StructuredCloneData& aData,
-                                     JS::Handle<JSObject *> aCpows,
-                                     nsIPrincipal* aPrincipal,
-                                     nsTArray<StructuredCloneData>* aRetVal,
-                                     bool aIsSync) override
+  bool DoSendBlockingMessage(JSContext* aCx,
+                             const nsAString& aMessage,
+                             StructuredCloneData& aData,
+                             JS::Handle<JSObject *> aCpows,
+                             nsIPrincipal* aPrincipal,
+                             nsTArray<StructuredCloneData>* aRetVal,
+                             bool aIsSync) override
   {
     SameProcessMessageQueue* queue = SameProcessMessageQueue::Get();
     queue->Flush();
 
     if (nsFrameMessageManager::sSameProcessParentManager) {
       SameProcessCpowHolder cpows(JS::RootingContext::get(aCx), aCpows);
       RefPtr<nsFrameMessageManager> ppm = nsFrameMessageManager::sSameProcessParentManager;
       ppm->ReceiveMessage(static_cast<nsIContentFrameMessageManager*>(ppm.get()), nullptr, aMessage,
                           true, &aData, &cpows, aPrincipal, aRetVal);
     }
     return true;
   }
 
-  virtual nsresult DoSendAsyncMessage(JSContext* aCx,
-                                  const nsAString& aMessage,
-                                  StructuredCloneData& aData,
-                                  JS::Handle<JSObject *> aCpows,
-                                  nsIPrincipal* aPrincipal) override
+  nsresult DoSendAsyncMessage(JSContext* aCx,
+                              const nsAString& aMessage,
+                              StructuredCloneData& aData,
+                              JS::Handle<JSObject *> aCpows,
+                              nsIPrincipal* aPrincipal) override
   {
     SameProcessMessageQueue* queue = SameProcessMessageQueue::Get();
     JS::RootingContext* rcx = JS::RootingContext::get(aCx);
     RefPtr<nsAsyncMessageToSameProcessParent> ev =
       new nsAsyncMessageToSameProcessParent(rcx, aCpows);
     nsresult rv = ev->Init(aMessage, aData, aPrincipal);
 
     if (NS_FAILED(rv)) {
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -714,87 +714,87 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(DialogV
 // nsOuterWindowProxy: Outer Window Proxy
 //*****************************************************************************
 
 class nsOuterWindowProxy : public js::Wrapper
 {
 public:
   constexpr nsOuterWindowProxy() : js::Wrapper(0) { }
 
-  virtual bool finalizeInBackground(const JS::Value& priv) const override {
+  bool finalizeInBackground(const JS::Value& priv) const override {
     return false;
   }
 
   // Standard internal methods
-  virtual bool getOwnPropertyDescriptor(JSContext* cx,
-                                        JS::Handle<JSObject*> proxy,
-                                        JS::Handle<jsid> id,
-                                        JS::MutableHandle<JS::PropertyDescriptor> desc)
-                                        const override;
-  virtual bool defineProperty(JSContext* cx,
-                              JS::Handle<JSObject*> proxy,
-                              JS::Handle<jsid> id,
-                              JS::Handle<JS::PropertyDescriptor> desc,
-                              JS::ObjectOpResult &result) const override;
-  virtual bool ownPropertyKeys(JSContext *cx,
-                               JS::Handle<JSObject*> proxy,
-                               JS::AutoIdVector &props) const override;
-  virtual bool delete_(JSContext *cx, JS::Handle<JSObject*> proxy,
+  bool getOwnPropertyDescriptor(JSContext* cx,
+                                JS::Handle<JSObject*> proxy,
+                                JS::Handle<jsid> id,
+                                JS::MutableHandle<JS::PropertyDescriptor> desc)
+                                const override;
+  bool defineProperty(JSContext* cx,
+                      JS::Handle<JSObject*> proxy,
+                      JS::Handle<jsid> id,
+                      JS::Handle<JS::PropertyDescriptor> desc,
+                      JS::ObjectOpResult &result) const override;
+  bool ownPropertyKeys(JSContext *cx,
+                       JS::Handle<JSObject*> proxy,
+                       JS::AutoIdVector &props) const override;
+  bool delete_(JSContext *cx, JS::Handle<JSObject*> proxy,
                        JS::Handle<jsid> id,
                        JS::ObjectOpResult &result) const override;
 
-  virtual bool getPrototypeIfOrdinary(JSContext* cx,
-                                      JS::Handle<JSObject*> proxy,
-                                      bool* isOrdinary,
-                                      JS::MutableHandle<JSObject*> protop) const override;
-
-  virtual bool enumerate(JSContext *cx, JS::Handle<JSObject*> proxy,
-                         JS::MutableHandle<JSObject*> vp) const override;
-  virtual bool preventExtensions(JSContext* cx,
-                                 JS::Handle<JSObject*> proxy,
-                                 JS::ObjectOpResult& result) const override;
-  virtual bool isExtensible(JSContext *cx, JS::Handle<JSObject*> proxy, bool *extensible)
-                            const override;
-  virtual bool has(JSContext *cx, JS::Handle<JSObject*> proxy,
-                   JS::Handle<jsid> id, bool *bp) const override;
-  virtual bool get(JSContext *cx, JS::Handle<JSObject*> proxy,
-                   JS::Handle<JS::Value> receiver,
-                   JS::Handle<jsid> id,
-                   JS::MutableHandle<JS::Value> vp) const override;
-  virtual bool set(JSContext *cx, JS::Handle<JSObject*> proxy,
-                   JS::Handle<jsid> id, JS::Handle<JS::Value> v,
-                   JS::Handle<JS::Value> receiver,
-                   JS::ObjectOpResult &result) const override;
+  bool getPrototypeIfOrdinary(JSContext* cx,
+                              JS::Handle<JSObject*> proxy,
+                              bool* isOrdinary,
+                              JS::MutableHandle<JSObject*> protop) const override;
+
+  bool enumerate(JSContext *cx, JS::Handle<JSObject*> proxy,
+                 JS::MutableHandle<JSObject*> vp) const override;
+  bool preventExtensions(JSContext* cx,
+                         JS::Handle<JSObject*> proxy,
+                         JS::ObjectOpResult& result) const override;
+  bool isExtensible(JSContext *cx, JS::Handle<JSObject*> proxy, bool *extensible)
+                    const override;
+  bool has(JSContext *cx, JS::Handle<JSObject*> proxy,
+           JS::Handle<jsid> id, bool *bp) const override;
+  bool get(JSContext *cx, JS::Handle<JSObject*> proxy,
+           JS::Handle<JS::Value> receiver,
+           JS::Handle<jsid> id,
+           JS::MutableHandle<JS::Value> vp) const override;
+  bool set(JSContext *cx, JS::Handle<JSObject*> proxy,
+           JS::Handle<jsid> id, JS::Handle<JS::Value> v,
+           JS::Handle<JS::Value> receiver,
+           JS::ObjectOpResult &result) const override;
 
   // SpiderMonkey extensions
-  virtual bool getPropertyDescriptor(JSContext* cx,
-                                     JS::Handle<JSObject*> proxy,
-                                     JS::Handle<jsid> id,
-                                     JS::MutableHandle<JS::PropertyDescriptor> desc)
-                                     const override;
-  virtual bool hasOwn(JSContext *cx, JS::Handle<JSObject*> proxy,
-                      JS::Handle<jsid> id, bool *bp) const override;
-  virtual bool getOwnEnumerablePropertyKeys(JSContext *cx, JS::Handle<JSObject*> proxy,
-                                            JS::AutoIdVector &props) const override;
-  virtual const char *className(JSContext *cx,
-                                JS::Handle<JSObject*> wrapper) const override;
-
-  virtual void finalize(JSFreeOp *fop, JSObject *proxy) const override;
-
-  virtual bool isCallable(JSObject *obj) const override {
+  bool getPropertyDescriptor(JSContext* cx,
+                             JS::Handle<JSObject*> proxy,
+                             JS::Handle<jsid> id,
+                             JS::MutableHandle<JS::PropertyDescriptor> desc)
+                             const override;
+  bool hasOwn(JSContext *cx, JS::Handle<JSObject*> proxy,
+              JS::Handle<jsid> id, bool *bp) const override;
+  bool getOwnEnumerablePropertyKeys(JSContext *cx, JS::Handle<JSObject*> proxy,
+                                    JS::AutoIdVector &props) const override;
+  const char *className(JSContext *cx,
+                        JS::Handle<JSObject*> wrapper) const override;
+
+  void finalize(JSFreeOp *fop, JSObject *proxy) const override;
+
+  bool isCallable(JSObject *obj) const override {
     return false;
   }
-  virtual bool isConstructor(JSObject *obj) const override {
+  bool isConstructor(JSObject *obj) const override {
     return false;
   }
 
-  virtual bool watch(JSContext *cx, JS::Handle<JSObject*> proxy,
-                     JS::Handle<jsid> id, JS::Handle<JSObject*> callable) const override;
-  virtual bool unwatch(JSContext *cx, JS::Handle<JSObject*> proxy,
-                       JS::Handle<jsid> id) const override;
+  bool watch(JSContext *cx, JS::Handle<JSObject*> proxy,
+             JS::Handle<jsid> id, JS::Handle<JSObject*> callable) const override;
+  bool unwatch(JSContext *cx, JS::Handle<JSObject*> proxy,
+               JS::Handle<jsid> id) const override;
 
   static void ObjectMoved(JSObject *obj, const JSObject *old);
 
   static const nsOuterWindowProxy singleton;
 
 protected:
   static nsGlobalWindow* GetOuterWindow(JSObject *proxy)
   {
@@ -1184,17 +1184,17 @@ nsOuterWindowProxy::ObjectMoved(JSObject
 const nsOuterWindowProxy
 nsOuterWindowProxy::singleton;
 
 class nsChromeOuterWindowProxy : public nsOuterWindowProxy
 {
 public:
   constexpr nsChromeOuterWindowProxy() : nsOuterWindowProxy() { }
 
-  virtual const char *className(JSContext *cx, JS::Handle<JSObject*> wrapper) const override;
+  const char *className(JSContext *cx, JS::Handle<JSObject*> wrapper) const override;
 
   static const nsChromeOuterWindowProxy singleton;
 };
 
 const char *
 nsChromeOuterWindowProxy::className(JSContext *cx,
                                     JS::Handle<JSObject*> proxy) const
 {
@@ -6333,17 +6333,17 @@ public:
     , mFullscreen(aFullscreen)
   {
     MOZ_COUNT_CTOR(FullscreenTransitionTask);
   }
 
   NS_IMETHOD Run() override;
 
 private:
-  virtual ~FullscreenTransitionTask()
+  ~FullscreenTransitionTask() override
   {
     MOZ_COUNT_DTOR(FullscreenTransitionTask);
   }
 
   /**
    * The flow of fullscreen transition:
    *
    *         parent process         |         child process
@@ -9057,19 +9057,19 @@ nsGlobalWindow::NotifyDOMWindowDestroyed
                       DOM_WINDOW_DESTROYED_TOPIC, nullptr);
   }
 }
 
 // Try to match compartments that are not web content by matching compartments
 // with principals that are either the system principal or an expanded principal.
 // This may not return true for all non-web-content compartments.
 struct BrowserCompartmentMatcher : public js::CompartmentFilter {
-  virtual bool match(JSCompartment* c) const override
+  bool match(JSCompartment* aC) const override
   {
-    nsCOMPtr<nsIPrincipal> pc = nsJSPrincipals::get(JS_GetCompartmentPrincipals(c));
+    nsCOMPtr<nsIPrincipal> pc = nsJSPrincipals::get(JS_GetCompartmentPrincipals(aC));
     return nsContentUtils::IsSystemOrExpandedPrincipal(pc);
   }
 };
 
 
 class WindowDestroyedEvent : public Runnable
 {
 public:
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -152,19 +152,19 @@ InActiveDocument(nsIContent *aContent)
 /// Runnables and helper classes
 ///
 
 class nsAsyncInstantiateEvent : public Runnable {
 public:
   explicit nsAsyncInstantiateEvent(nsObjectLoadingContent* aContent)
   : mContent(aContent) {}
 
-  ~nsAsyncInstantiateEvent() = default;
-
-  NS_IMETHOD Run();
+  ~nsAsyncInstantiateEvent() override = default;
+
+  NS_IMETHOD Run() override;
 
 private:
   nsCOMPtr<nsIObjectLoadingContent> mContent;
 };
 
 NS_IMETHODIMP
 nsAsyncInstantiateEvent::Run()
 {
@@ -185,19 +185,19 @@ nsAsyncInstantiateEvent::Run()
 // (outside an active document) or stopped (in a document but unrendered). This
 // is used to allow scripts to move a plugin around the document hierarchy
 // without re-instantiating it.
 class CheckPluginStopEvent : public Runnable {
 public:
   explicit CheckPluginStopEvent(nsObjectLoadingContent* aContent)
   : mContent(aContent) {}
 
-  ~CheckPluginStopEvent() = default;
-
-  NS_IMETHOD Run();
+  ~CheckPluginStopEvent() override = default;
+
+  NS_IMETHOD Run() override;
 
 private:
   nsCOMPtr<nsIObjectLoadingContent> mContent;
 };
 
 NS_IMETHODIMP
 CheckPluginStopEvent::Run()
 {
@@ -283,19 +283,19 @@ public:
                       const nsAString& aEvent)
     : mTarget(aTarget)
     , mDocument(aDocument)
     , mEvent(aEvent)
   {
     MOZ_ASSERT(aTarget && aDocument);
   }
 
-  ~nsSimplePluginEvent() = default;
-
-  NS_IMETHOD Run();
+  ~nsSimplePluginEvent() override = default;
+
+  NS_IMETHOD Run() override;
 
 private:
   nsCOMPtr<nsISupports> mTarget;
   nsCOMPtr<nsIDocument> mDocument;
   nsString mEvent;
 };
 
 NS_IMETHODIMP
@@ -331,19 +331,19 @@ public:
     : mContent(aContent),
       mPluginDumpID(aPluginDumpID),
       mBrowserDumpID(aBrowserDumpID),
       mPluginName(aPluginName),
       mPluginFilename(aPluginFilename),
       mSubmittedCrashReport(submittedCrashReport)
   {}
 
-  ~nsPluginCrashedEvent() = default;
-
-  NS_IMETHOD Run();
+  ~nsPluginCrashedEvent() override = default;
+
+  NS_IMETHOD Run() override;
 };
 
 NS_IMETHODIMP
 nsPluginCrashedEvent::Run()
 {
   LOG(("OBJLC [%p]: Firing plugin crashed event\n",
        mContent.get()));
 
@@ -388,17 +388,17 @@ public:
 
   // Runnable
   NS_IMETHOD Run() override;
 
   // nsITimerCallback
   NS_IMETHOD Notify(nsITimer* timer) override;
 
 protected:
-  virtual ~nsStopPluginRunnable() = default;
+  ~nsStopPluginRunnable() override = default;
 
 private:
   nsCOMPtr<nsITimer> mTimer;
   RefPtr<nsPluginInstanceOwner> mInstanceOwner;
   nsCOMPtr<nsIObjectLoadingContent> mContent;
 };
 
 NS_IMPL_ISUPPORTS_INHERITED(nsStopPluginRunnable, Runnable, nsITimerCallback)
--- a/dom/browser-element/BrowserElementAudioChannel.cpp
+++ b/dom/browser-element/BrowserElementAudioChannel.cpp
@@ -204,17 +204,17 @@ class GetVolumeRunnable final : public B
 public:
   GetVolumeRunnable(nsPIDOMWindowInner* aParentWindow,
 		    nsPIDOMWindowOuter* aFrameWindow,
                     DOMRequest* aRequest, AudioChannel aAudioChannel)
     : BaseRunnable(aParentWindow, aFrameWindow, aRequest, aAudioChannel)
   {}
 
 protected:
-  virtual void DoWork(AudioChannelService* aService, JSContext* aCx) override
+  void DoWork(AudioChannelService* aService, JSContext* aCx) override
   {
     float volume = aService->GetAudioChannelVolume(mFrameWindow, mAudioChannel);
 
     JS::Rooted<JS::Value> value(aCx);
     if (!ToJSValue(aCx, volume, &value)) {
       mRequest->FireError(NS_ERROR_FAILURE);
       return;
     }
@@ -228,17 +228,17 @@ class GetMutedRunnable final : public Ba
 public:
   GetMutedRunnable(nsPIDOMWindowInner* aParentWindow,
 		   nsPIDOMWindowOuter* aFrameWindow,
                    DOMRequest* aRequest, AudioChannel aAudioChannel)
     : BaseRunnable(aParentWindow, aFrameWindow, aRequest, aAudioChannel)
   {}
 
 protected:
-  virtual void DoWork(AudioChannelService* aService, JSContext* aCx) override
+  void DoWork(AudioChannelService* aService, JSContext* aCx) override
   {
     bool muted = aService->GetAudioChannelMuted(mFrameWindow, mAudioChannel);
 
     JS::Rooted<JS::Value> value(aCx);
     if (!ToJSValue(aCx, muted, &value)) {
       mRequest->FireError(NS_ERROR_FAILURE);
       return;
     }
@@ -266,17 +266,17 @@ public:
 		   nsPIDOMWindowOuter* aFrameWindow,
                    DOMRequest* aRequest, AudioChannel aAudioChannel)
     : BaseRunnable(aParentWindow, aFrameWindow, aRequest, aAudioChannel)
     , mActive(true)
     , mValueKnown(false)
   {}
 
 protected:
-  virtual void DoWork(AudioChannelService* aService, JSContext* aCx) override
+  void DoWork(AudioChannelService* aService, JSContext* aCx) override
   {
     if (!mValueKnown) {
       mActive = aService->IsAudioChannelActive(mFrameWindow, mAudioChannel);
     }
 
     JS::Rooted<JS::Value> value(aCx);
     if (!ToJSValue(aCx, mActive, &value)) {
       mRequest->FireError(NS_ERROR_FAILURE);
@@ -292,17 +292,17 @@ class FireSuccessRunnable final : public
 public:
   FireSuccessRunnable(nsPIDOMWindowInner* aParentWindow,
 		      nsPIDOMWindowOuter* aFrameWindow,
                       DOMRequest* aRequest, AudioChannel aAudioChannel)
     : BaseRunnable(aParentWindow, aFrameWindow, aRequest, aAudioChannel)
   {}
 
 protected:
-  virtual void DoWork(AudioChannelService* aService, JSContext* aCx) override
+  void DoWork(AudioChannelService* aService, JSContext* aCx) override
   {
     JS::Rooted<JS::Value> value(aCx);
     mRequest->FireSuccess(value);
   }
 };
 
 } // anonymous namespace
 
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -3810,17 +3810,17 @@ EventStateManager::SetCursor(int32_t aCu
   return NS_OK;
 }
 
 class MOZ_STACK_CLASS ESMEventCB : public EventDispatchingCallback
 {
 public:
   explicit ESMEventCB(nsIContent* aTarget) : mTarget(aTarget) {}
 
-  virtual void HandleEvent(EventChainPostVisitor& aVisitor)
+  void HandleEvent(EventChainPostVisitor& aVisitor) override
   {
     if (aVisitor.mPresContext) {
       nsIFrame* frame = aVisitor.mPresContext->GetPrimaryFrameFor(mTarget);
       if (frame) {
         frame->HandleEvent(aVisitor.mPresContext,
                            aVisitor.mEvent->AsGUIEvent(),
                            &aVisitor.mEventStatus);
       }
--- a/dom/html/PluginDocument.cpp
+++ b/dom/html/PluginDocument.cpp
@@ -27,51 +27,51 @@ class PluginDocument final : public Medi
                            , public nsIPluginDocument
 {
 public:
   PluginDocument();
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIPLUGINDOCUMENT
 
-  virtual nsresult StartDocumentLoad(const char*         aCommand,
-                                     nsIChannel*         aChannel,
-                                     nsILoadGroup*       aLoadGroup,
-                                     nsISupports*        aContainer,
-                                     nsIStreamListener** aDocListener,
-                                     bool                aReset = true,
-                                     nsIContentSink*     aSink = nullptr) override;
+  nsresult StartDocumentLoad(const char*         aCommand,
+                             nsIChannel*         aChannel,
+                             nsILoadGroup*       aLoadGroup,
+                             nsISupports*        aContainer,
+                             nsIStreamListener** aDocListener,
+                             bool                aReset = true,
+                             nsIContentSink*     aSink = nullptr) override;
 
-  virtual void SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject) override;
-  virtual bool CanSavePresentation(nsIRequest *aNewRequest) override;
+  void SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject) override;
+  bool CanSavePresentation(nsIRequest *aNewRequest) override;
 
   const nsCString& GetType() const { return mMimeType; }
   Element*         GetPluginContent() { return mPluginContent; }
 
   void StartLayout() { MediaDocument::StartLayout(); }
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(PluginDocument, MediaDocument)
 protected:
-  virtual ~PluginDocument();
+  ~PluginDocument() override;
 
   nsresult CreateSyntheticPluginDocument();
 
   nsCOMPtr<Element>                        mPluginContent;
   RefPtr<MediaDocumentStreamListener>    mStreamListener;
   nsCString                                mMimeType;
 };
 
 class PluginStreamListener : public MediaDocumentStreamListener
 {
 public:
   explicit PluginStreamListener(PluginDocument* aDoc)
     : MediaDocumentStreamListener(aDoc)
     , mPluginDoc(aDoc)
   {}
-  NS_IMETHOD OnStartRequest(nsIRequest* request, nsISupports *ctxt);
+  NS_IMETHOD OnStartRequest(nsIRequest* request, nsISupports *ctxt) override;
 private:
   RefPtr<PluginDocument> mPluginDoc;
 };
 
 
 NS_IMETHODIMP
 PluginStreamListener::OnStartRequest(nsIRequest* request, nsISupports *ctxt)
 {
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -5465,52 +5465,51 @@ class ConnectionPool::ConnectionRunnable
 {
 protected:
   DatabaseInfo* mDatabaseInfo;
   nsCOMPtr<nsIEventTarget> mOwningThread;
 
   explicit
   ConnectionRunnable(DatabaseInfo* aDatabaseInfo);
 
-  virtual
-  ~ConnectionRunnable() = default;
+  ~ConnectionRunnable() override = default;
 };
 
 class ConnectionPool::IdleConnectionRunnable final
   : public ConnectionRunnable
 {
   bool mNeedsCheckpoint;
 
 public:
   IdleConnectionRunnable(DatabaseInfo* aDatabaseInfo, bool aNeedsCheckpoint)
     : ConnectionRunnable(aDatabaseInfo)
     , mNeedsCheckpoint(aNeedsCheckpoint)
   { }
 
   NS_DECL_ISUPPORTS_INHERITED
 
 private:
-  ~IdleConnectionRunnable() = default;
+  ~IdleConnectionRunnable() override = default;
 
   NS_DECL_NSIRUNNABLE
 };
 
 class ConnectionPool::CloseConnectionRunnable final
   : public ConnectionRunnable
 {
 public:
   explicit
   CloseConnectionRunnable(DatabaseInfo* aDatabaseInfo)
     : ConnectionRunnable(aDatabaseInfo)
   { }
 
   NS_DECL_ISUPPORTS_INHERITED
 
 private:
-  ~CloseConnectionRunnable() = default;
+  ~CloseConnectionRunnable() override = default;
 
   NS_DECL_NSIRUNNABLE
 };
 
 struct ConnectionPool::ThreadInfo
 {
   nsCOMPtr<nsIThread> mThread;
   RefPtr<ThreadRunnable> mRunnable;
@@ -5616,17 +5615,17 @@ class ConnectionPool::FinishCallbackWrap
 public:
   FinishCallbackWrapper(ConnectionPool* aConnectionPool,
                         uint64_t aTransactionId,
                         FinishCallback* aCallback);
 
   NS_DECL_ISUPPORTS_INHERITED
 
 private:
-  ~FinishCallbackWrapper();
+  ~FinishCallbackWrapper() override;
 
   NS_DECL_NSIRUNNABLE
 };
 
 struct ConnectionPool::IdleResource
 {
   TimeStamp mIdleTime;
 
@@ -5717,17 +5716,17 @@ public:
 
   uint32_t
   SerialNumber() const
   {
     return mSerialNumber;
   }
 
 private:
-  ~ThreadRunnable();
+  ~ThreadRunnable() override;
 
   NS_DECL_NSIRUNNABLE
 };
 
 class ConnectionPool::TransactionInfo final
 {
   friend class nsAutoPtr<TransactionInfo>;
 
@@ -5890,18 +5889,17 @@ protected:
     , mLoggingSerialNumber(aLoggingSerialNumber)
     , mResultCode(NS_OK)
     , mOperationMayProceed(true)
     , mActorDestroyed(false)
   {
     AssertIsOnOwningThread();
   }
 
-  virtual
-  ~DatabaseOperationBase()
+  ~DatabaseOperationBase() override
   {
     MOZ_ASSERT(mActorDestroyed);
   }
 
   static void
   GetBindingClauseForKeyRange(const SerializedKeyRange& aKeyRange,
                               const nsACString& aKeyColumnName,
                               nsAutoCString& aBindingClause);
@@ -6096,18 +6094,17 @@ public:
 
 protected:
   explicit
   TransactionDatabaseOperationBase(TransactionBase* aTransaction);
 
   TransactionDatabaseOperationBase(TransactionBase* aTransaction,
                                    uint64_t aLoggingSerialNumber);
 
-  virtual
-  ~TransactionDatabaseOperationBase();
+  ~TransactionDatabaseOperationBase() override;
 
   virtual void
   RunOnConnectionThread();
 
   // Must be overridden in subclasses. Called on the target thread to allow the
   // subclass to perform necessary database or file operations. A successful
   // return value will trigger a SendSuccessResult callback on the background
   // thread while a failure value will trigger a SendFailureResult callback.
@@ -6183,50 +6180,50 @@ public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(mozilla::dom::indexedDB::Factory)
 
 private:
   // Only constructed in Create().
   explicit
   Factory(already_AddRefed<DatabaseLoggingInfo> aLoggingInfo);
 
   // Reference counted.
-  ~Factory();
+  ~Factory() override;
 
   // IPDL methods are only called by IPDL.
-  virtual void
+  void
   ActorDestroy(ActorDestroyReason aWhy) override;
 
-  virtual bool
+  bool
   RecvDeleteMe() override;
 
-  virtual bool
+  bool
   RecvIncrementLoggingRequestSerialNumber() override;
 
-  virtual PBackgroundIDBFactoryRequestParent*
+  PBackgroundIDBFactoryRequestParent*
   AllocPBackgroundIDBFactoryRequestParent(const FactoryRequestParams& aParams)
                                           override;
 
-  virtual bool
+  bool
   RecvPBackgroundIDBFactoryRequestConstructor(
                                      PBackgroundIDBFactoryRequestParent* aActor,
                                      const FactoryRequestParams& aParams)
                                      override;
 
-  virtual bool
+  bool
   DeallocPBackgroundIDBFactoryRequestParent(
                                      PBackgroundIDBFactoryRequestParent* aActor)
                                      override;
 
-  virtual PBackgroundIDBDatabaseParent*
+  PBackgroundIDBDatabaseParent*
   AllocPBackgroundIDBDatabaseParent(
                                    const DatabaseSpec& aSpec,
                                    PBackgroundIDBFactoryRequestParent* aRequest)
                                    override;
 
-  virtual bool
+  bool
   DeallocPBackgroundIDBDatabaseParent(PBackgroundIDBDatabaseParent* aActor)
                                       override;
 };
 
 class WaitForTransactionsHelper final
   : public Runnable
 {
   const nsCString mDatabaseId;
@@ -6253,17 +6250,17 @@ public:
   }
 
   void
   WaitForTransactions();
 
   NS_DECL_ISUPPORTS_INHERITED
 
 private:
-  ~WaitForTransactionsHelper()
+  ~WaitForTransactionsHelper() override
   {
     MOZ_ASSERT(!mCallback);
     MOZ_ASSERT(mState == State::Complete);
   }
 
   void
   MaybeWaitForTransactions();
 
@@ -6500,17 +6497,17 @@ public:
     }
 #endif
 
     return mConnection;
   }
 
 private:
   // Reference counted.
-  ~Database()
+  ~Database() override
   {
     MOZ_ASSERT(mClosed);
     MOZ_ASSERT_IF(mActorWasAlive, mActorDestroyed);
   }
 
   bool
   CloseInternal();
 
@@ -6522,119 +6519,119 @@ private:
 
   void
   CleanupMetadata();
 
   bool
   VerifyRequestParams(const DatabaseRequestParams& aParams) const;
 
   // IPDL methods are only called by IPDL.
-  virtual void
+  void
   ActorDestroy(ActorDestroyReason aWhy) override;
 
-  virtual PBackgroundIDBDatabaseFileParent*
+  PBackgroundIDBDatabaseFileParent*
   AllocPBackgroundIDBDatabaseFileParent(PBlobParent* aBlobParent)
                                         override;
 
-  virtual bool
+  bool
   DeallocPBackgroundIDBDatabaseFileParent(
                                        PBackgroundIDBDatabaseFileParent* aActor)
                                        override;
 
-  virtual PBackgroundIDBDatabaseRequestParent*
+  PBackgroundIDBDatabaseRequestParent*
   AllocPBackgroundIDBDatabaseRequestParent(const DatabaseRequestParams& aParams)
                                            override;
 
-  virtual bool
+  bool
   RecvPBackgroundIDBDatabaseRequestConstructor(
                                     PBackgroundIDBDatabaseRequestParent* aActor,
                                     const DatabaseRequestParams& aParams)
                                     override;
 
-  virtual bool
+  bool
   DeallocPBackgroundIDBDatabaseRequestParent(
                                     PBackgroundIDBDatabaseRequestParent* aActor)
                                     override;
 
-  virtual PBackgroundIDBTransactionParent*
+  PBackgroundIDBTransactionParent*
   AllocPBackgroundIDBTransactionParent(
                                     const nsTArray<nsString>& aObjectStoreNames,
                                     const Mode& aMode)
                                     override;
 
-  virtual bool
+  bool
   RecvPBackgroundIDBTransactionConstructor(
                                     PBackgroundIDBTransactionParent* aActor,
                                     InfallibleTArray<nsString>&& aObjectStoreNames,
                                     const Mode& aMode)
                                     override;
 
-  virtual bool
+  bool
   DeallocPBackgroundIDBTransactionParent(
                                         PBackgroundIDBTransactionParent* aActor)
                                         override;
 
-  virtual PBackgroundIDBVersionChangeTransactionParent*
+  PBackgroundIDBVersionChangeTransactionParent*
   AllocPBackgroundIDBVersionChangeTransactionParent(
                                               const uint64_t& aCurrentVersion,
                                               const uint64_t& aRequestedVersion,
                                               const int64_t& aNextObjectStoreId,
                                               const int64_t& aNextIndexId)
                                               override;
 
-  virtual bool
+  bool
   DeallocPBackgroundIDBVersionChangeTransactionParent(
                            PBackgroundIDBVersionChangeTransactionParent* aActor)
                            override;
 
-  virtual PBackgroundMutableFileParent*
+  PBackgroundMutableFileParent*
   AllocPBackgroundMutableFileParent(const nsString& aName,
                                     const nsString& aType) override;
 
-  virtual bool
+  bool
   DeallocPBackgroundMutableFileParent(PBackgroundMutableFileParent* aActor)
                                       override;
 
-  virtual bool
+  bool
   RecvDeleteMe() override;
 
-  virtual bool
+  bool
   RecvBlocked() override;
 
-  virtual bool
+  bool
   RecvClose() override;
 };
 
 class Database::StartTransactionOp final
   : public TransactionDatabaseOperationBase
 {
   friend class Database;
 
 private:
   explicit
   StartTransactionOp(TransactionBase* aTransaction)
     : TransactionDatabaseOperationBase(aTransaction,
                                        /* aLoggingSerialNumber */ 0)
   { }
 
-  ~StartTransactionOp() = default;
-
-  virtual void
+  ~StartTransactionOp() override = default;
+
+  void
   RunOnConnectionThread() override;
 
-  virtual nsresult
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 
-  virtual nsresult
+  nsresult
   SendSuccessResult() override;
 
-  virtual bool
+  bool
   SendFailureResult(nsresult aResultCode) override;
 
-  virtual void
+  void
   Cleanup() override;
 };
 
 class DatabaseFile final
   : public PBackgroundIDBDatabaseFileParent
 {
   friend class Database;
 
@@ -6689,19 +6686,19 @@ private:
     : mBlobImpl(aBlobImpl)
     , mFileInfo(aFileInfo)
   {
     AssertIsOnBackgroundThread();
     MOZ_ASSERT(aBlobImpl);
     MOZ_ASSERT(aFileInfo);
   }
 
-  ~DatabaseFile() = default;
-
-  virtual void
+  ~DatabaseFile() override = default;
+
+  void
   ActorDestroy(ActorDestroyReason aWhy) override
   {
     AssertIsOnBackgroundThread();
 
     mBlobImpl = nullptr;
     mFileInfo = nullptr;
   }
 };
@@ -6978,17 +6975,17 @@ class TransactionBase::CommitOp final
   friend class TransactionBase;
 
   RefPtr<TransactionBase> mTransaction;
   nsresult mResultCode;
 
 private:
   CommitOp(TransactionBase* aTransaction, nsresult aResultCode);
 
-  ~CommitOp() = default;
+  ~CommitOp() override = default;
 
   // Writes new autoIncrement counts to database.
   nsresult
   WriteAutoIncrementCounts();
 
   // Updates counts after a database activity has finished.
   void
   CommitOrRollbackAutoIncrementCounts();
@@ -6998,20 +6995,20 @@ private:
 #ifdef DEBUG
   ;
 #else
   { }
 #endif
 
   NS_DECL_NSIRUNNABLE
 
-  virtual void
+  void
   TransactionFinishedBeforeUnblock() override;
 
-  virtual void
+  void
   TransactionFinishedAfterUnblock() override;
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
 };
 
 class NormalTransaction final
   : public TransactionBase
@@ -7023,59 +7020,59 @@ class NormalTransaction final
 
 private:
   // This constructor is only called by Database.
   NormalTransaction(Database* aDatabase,
                     TransactionBase::Mode aMode,
                     nsTArray<RefPtr<FullObjectStoreMetadata>>& aObjectStores);
 
   // Reference counted.
-  ~NormalTransaction() = default;
+  ~NormalTransaction() override = default;
 
   bool
   IsSameProcessActor();
 
   // Only called by TransactionBase.
-  virtual void
+  void
   SendCompleteNotification(nsresult aResult) override;
 
   // IPDL methods are only called by IPDL.
-  virtual void
+  void
   ActorDestroy(ActorDestroyReason aWhy) override;
 
-  virtual bool
+  bool
   RecvDeleteMe() override;
 
-  virtual bool
+  bool
   RecvCommit() override;
 
-  virtual bool
+  bool
   RecvAbort(const nsresult& aResultCode) override;
 
-  virtual PBackgroundIDBRequestParent*
+  PBackgroundIDBRequestParent*
   AllocPBackgroundIDBRequestParent(const RequestParams& aParams) override;
 
-  virtual bool
+  bool
   RecvPBackgroundIDBRequestConstructor(PBackgroundIDBRequestParent* aActor,
                                        const RequestParams& aParams)
                                        override;
 
-  virtual bool
+  bool
   DeallocPBackgroundIDBRequestParent(PBackgroundIDBRequestParent* aActor)
                                      override;
 
-  virtual PBackgroundIDBCursorParent*
+  PBackgroundIDBCursorParent*
   AllocPBackgroundIDBCursorParent(const OpenCursorParams& aParams) override;
 
-  virtual bool
+  bool
   RecvPBackgroundIDBCursorConstructor(PBackgroundIDBCursorParent* aActor,
                                       const OpenCursorParams& aParams)
                                       override;
 
-  virtual bool
+  bool
   DeallocPBackgroundIDBCursorParent(PBackgroundIDBCursorParent* aActor)
                                     override;
 };
 
 class VersionChangeTransaction final
   : public TransactionBase
   , public PBackgroundIDBVersionChangeTransactionParent
 {
@@ -7086,93 +7083,93 @@ class VersionChangeTransaction final
 
   bool mActorWasAlive;
 
 private:
   // Only called by OpenDatabaseOp.
   explicit VersionChangeTransaction(OpenDatabaseOp* aOpenDatabaseOp);
 
   // Reference counted.
-  ~VersionChangeTransaction();
+  ~VersionChangeTransaction() override;
 
   bool
   IsSameProcessActor();
 
   // Only called by OpenDatabaseOp.
   bool
   CopyDatabaseMetadata();
 
   void
   SetActorAlive();
 
   // Only called by TransactionBase.
-  virtual void
+  void
   UpdateMetadata(nsresult aResult) override;
 
   // Only called by TransactionBase.
-  virtual void
+  void
   SendCompleteNotification(nsresult aResult) override;
 
   // IPDL methods are only called by IPDL.
-  virtual void
+  void
   ActorDestroy(ActorDestroyReason aWhy) override;
 
-  virtual bool
+  bool
   RecvDeleteMe() override;
 
-  virtual bool
+  bool
   RecvCommit() override;
 
-  virtual bool
+  bool
   RecvAbort(const nsresult& aResultCode) override;
 
-  virtual bool
+  bool
   RecvCreateObjectStore(const ObjectStoreMetadata& aMetadata) override;
 
-  virtual bool
+  bool
   RecvDeleteObjectStore(const int64_t& aObjectStoreId) override;
 
-  virtual bool
+  bool
   RecvRenameObjectStore(const int64_t& aObjectStoreId,
                         const nsString& aName) override;
 
-  virtual bool
+  bool
   RecvCreateIndex(const int64_t& aObjectStoreId,
                   const IndexMetadata& aMetadata) override;
 
-  virtual bool
+  bool
   RecvDeleteIndex(const int64_t& aObjectStoreId,
                   const int64_t& aIndexId) override;
 
-  virtual bool
+  bool
   RecvRenameIndex(const int64_t& aObjectStoreId,
                   const int64_t& aIndexId,
                   const nsString& aName) override;
 
-  virtual PBackgroundIDBRequestParent*
+  PBackgroundIDBRequestParent*
   AllocPBackgroundIDBRequestParent(const RequestParams& aParams) override;
 
-  virtual bool
+  bool
   RecvPBackgroundIDBRequestConstructor(PBackgroundIDBRequestParent* aActor,
                                        const RequestParams& aParams)
                                        override;
 
-  virtual bool
+  bool
   DeallocPBackgroundIDBRequestParent(PBackgroundIDBRequestParent* aActor)
                                      override;
 
-  virtual PBackgroundIDBCursorParent*
+  PBackgroundIDBCursorParent*
   AllocPBackgroundIDBCursorParent(const OpenCursorParams& aParams) override;
 
-  virtual bool
+  bool
   RecvPBackgroundIDBCursorConstructor(PBackgroundIDBCursorParent* aActor,
                                       const OpenCursorParams& aParams)
                                       override;
 
-  virtual bool
+  bool
   DeallocPBackgroundIDBCursorParent(PBackgroundIDBCursorParent* aActor)
                                     override;
 };
 
 class MutableFile
   : public BackgroundMutableFileParentBase
 {
   RefPtr<Database> mDatabase;
@@ -7197,46 +7194,46 @@ public:
   GetFileInfo() const
   {
     AssertIsOnBackgroundThread();
     MOZ_ASSERT(mFileInfo);
 
     return mFileInfo;
   }
 
-  virtual void
+  void
   NoteActiveState() override;
 
-  virtual void
+  void
   NoteInactiveState() override;
 
-  virtual PBackgroundParent*
+  PBackgroundParent*
   GetBackgroundParent() const override;
 
-  virtual already_AddRefed<nsISupports>
+  already_AddRefed<nsISupports>
   CreateStream(bool aReadOnly) override;
 
-  virtual already_AddRefed<BlobImpl>
+  already_AddRefed<BlobImpl>
   CreateBlobImpl() override;
 
 private:
   MutableFile(nsIFile* aFile,
               Database* aDatabase,
               FileInfo* aFileInfo);
 
-  ~MutableFile();
-
-  virtual PBackgroundFileHandleParent*
+  ~MutableFile() override;
+
+  PBackgroundFileHandleParent*
   AllocPBackgroundFileHandleParent(const FileMode& aMode) override;
 
-  virtual bool
+  bool
   RecvPBackgroundFileHandleConstructor(PBackgroundFileHandleParent* aActor,
                                        const FileMode& aMode) override;
 
-  virtual bool
+  bool
   RecvGetFileId(int64_t* aFileId) override;
 };
 
 class FactoryOp
   : public DatabaseOperationBase
   , public OpenDirectoryListener
   , public PBackgroundIDBFactoryRequestParent
 {
@@ -7366,18 +7363,17 @@ public:
   }
 
 protected:
   FactoryOp(Factory* aFactory,
             already_AddRefed<ContentParent> aContentParent,
             const CommonFactoryRequestParams& aCommonParams,
             bool aDeleting);
 
-  virtual
-  ~FactoryOp()
+  ~FactoryOp() override
   {
     // Normally this would be out-of-line since it is a virtual function but
     // MSVC 2010 fails to link for some reason if it is not inlined here...
     MOZ_ASSERT_IF(OperationMayProceed(),
                   mState == State::Initial || mState == State::Completed);
   }
 
   nsresult
@@ -7425,27 +7421,27 @@ protected:
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // Common nsIRunnable implementation that subclasses may not override.
   NS_IMETHOD
   Run() final;
 
   // OpenDirectoryListener overrides.
-  virtual void
+  void
   DirectoryLockAcquired(DirectoryLock* aLock) override;
 
-  virtual void
+  void
   DirectoryLockFailed() override;
 
   // IPDL methods.
-  virtual void
+  void
   ActorDestroy(ActorDestroyReason aWhy) override;
 
-  virtual bool
+  bool
   RecvPermissionRetry() override;
 
   virtual void
   SendBlockedNotification() = 0;
 
 private:
   nsresult
   CheckPermission(ContentParent* aContentParent,
@@ -7539,17 +7535,17 @@ public:
 
   bool
   IsOtherProcessActor() const
   {
     return mOptionalContentParentId.isSome();
   }
 
 private:
-  ~OpenDatabaseOp()
+  ~OpenDatabaseOp() override
   {
     MOZ_ASSERT(!mVersionChangeOp);
   }
 
   nsresult
   LoadDatabaseInformation(mozIStorageConnection* aConnection);
 
   nsresult
@@ -7570,38 +7566,38 @@ private:
   ;
 #else
   { }
 #endif
 
   void
   ConnectionClosedCallback();
 
-  virtual void
+  void
   ActorDestroy(ActorDestroyReason aWhy) override;
 
-  virtual nsresult
+  nsresult
   DatabaseOpen() override;
 
-  virtual nsresult
+  nsresult
   DoDatabaseWork() override;
 
-  virtual nsresult
+  nsresult
   BeginVersionChange() override;
 
-  virtual void
+  void
   NoteDatabaseClosed(Database* aDatabase) override;
 
-  virtual void
+  void
   SendBlockedNotification() override;
 
-  virtual nsresult
+  nsresult
   DispatchToWorkThread() override;
 
-  virtual void
+  void
   SendResults() override;
 
 #ifdef ENABLE_INTL_API
   static nsresult
   UpdateLocaleAwareIndex(mozIStorageConnection* aConnection,
                          const IndexMetadata& aIndexMetadata,
                          const nsCString& aLocale);
 #endif
@@ -7625,31 +7621,31 @@ private:
     , mOpenDatabaseOp(aOpenDatabaseOp)
     , mRequestedVersion(aOpenDatabaseOp->mRequestedVersion)
     , mPreviousVersion(aOpenDatabaseOp->mMetadata->mCommonMetadata.version())
   {
     MOZ_ASSERT(aOpenDatabaseOp);
     MOZ_ASSERT(mRequestedVersion);
   }
 
-  ~VersionChangeOp()
+  ~VersionChangeOp() override
   {
     MOZ_ASSERT(!mOpenDatabaseOp);
   }
 
-  virtual nsresult
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 
-  virtual nsresult
+  nsresult
   SendSuccessResult() override;
 
-  virtual bool
+  bool
   SendFailureResult(nsresult aResultCode) override;
 
-  virtual void
+  void
   Cleanup() override;
 };
 
 class DeleteDatabaseOp final
   : public FactoryOp
 {
   class VersionChangeOp;
 
@@ -7661,40 +7657,40 @@ public:
   DeleteDatabaseOp(Factory* aFactory,
                    already_AddRefed<ContentParent> aContentParent,
                    const CommonFactoryRequestParams& aParams)
     : FactoryOp(aFactory, Move(aContentParent), aParams, /* aDeleting */ true)
     , mPreviousVersion(0)
   { }
 
 private:
-  ~DeleteDatabaseOp() = default;
+  ~DeleteDatabaseOp() override = default;
 
   void
   LoadPreviousVersion(nsIFile* aDatabaseFile);
 
-  virtual nsresult
+  nsresult
   DatabaseOpen() override;
 
-  virtual nsresult
+  nsresult
   DoDatabaseWork() override;
 
-  virtual nsresult
+  nsresult
   BeginVersionChange() override;
 
-  virtual void
+  void
   NoteDatabaseClosed(Database* aDatabase) override;
 
-  virtual void
+  void
   SendBlockedNotification() override;
 
-  virtual nsresult
+  nsresult
   DispatchToWorkThread() override;
 
-  virtual void
+  void
   SendResults() override;
 };
 
 class DeleteDatabaseOp::VersionChangeOp final
   : public DatabaseOperationBase
 {
   friend class DeleteDatabaseOp;
 
@@ -7706,17 +7702,17 @@ private:
     : DatabaseOperationBase(aDeleteDatabaseOp->BackgroundChildLoggingId(),
                             aDeleteDatabaseOp->LoggingSerialNumber())
     , mDeleteDatabaseOp(aDeleteDatabaseOp)
   {
     MOZ_ASSERT(aDeleteDatabaseOp);
     MOZ_ASSERT(!aDeleteDatabaseOp->mDatabaseDirectoryPath.IsEmpty());
   }
 
-  ~VersionChangeOp() = default;
+  ~VersionChangeOp() override = default;
 
   nsresult
   RunOnIOThread();
 
   void
   RunOnOwningThread();
 
   nsresult
@@ -7761,18 +7757,17 @@ public:
     MOZ_ASSERT(mState == State::Initial);
 
     Unused << this->Run();
   }
 
 protected:
   DatabaseOp(Database* aDatabase);
 
-  virtual
-  ~DatabaseOp()
+  ~DatabaseOp() override
   {
     MOZ_ASSERT_IF(OperationMayProceed(),
                   mState == State::Initial || mState == State::Completed);
   }
 
   nsresult
   SendToIOThread();
 
@@ -7783,64 +7778,63 @@ protected:
   virtual void
   SendResults() = 0;
 
   // Common nsIRunnable implementation that subclasses may not override.
   NS_IMETHOD
   Run() final;
 
   // IPDL methods.
-  virtual void
+  void
   ActorDestroy(ActorDestroyReason aWhy) override;
 };
 
 class CreateFileOp final
   : public DatabaseOp
 {
   const CreateFileParams mParams;
 
   RefPtr<FileInfo> mFileInfo;
 
 public:
   CreateFileOp(Database* aDatabase,
                const DatabaseRequestParams& aParams);
 
 private:
-  ~CreateFileOp() = default;
+  ~CreateFileOp() override = default;
 
   nsresult
   CreateMutableFile(MutableFile** aMutableFile);
 
-  virtual nsresult
+  nsresult
   DoDatabaseWork() override;
 
-  virtual void
+  void
   SendResults() override;
 };
 
 class VersionChangeTransactionOp
   : public TransactionDatabaseOperationBase
 {
 public:
-  virtual void
+  void
   Cleanup() override;
 
 protected:
   explicit VersionChangeTransactionOp(VersionChangeTransaction* aTransaction)
     : TransactionDatabaseOperationBase(aTransaction)
   { }
 
-  virtual
-  ~VersionChangeTransactionOp() = default;
-
-private:
-  virtual nsresult
+  ~VersionChangeTransactionOp() override = default;
+
+private:
+  nsresult
   SendSuccessResult() override;
 
-  virtual bool
+  bool
   SendFailureResult(nsresult aResultCode) override;
 };
 
 class CreateObjectStoreOp final
   : public VersionChangeTransactionOp
 {
   friend class VersionChangeTransaction;
 
@@ -7851,19 +7845,19 @@ private:
   CreateObjectStoreOp(VersionChangeTransaction* aTransaction,
                       const ObjectStoreMetadata& aMetadata)
     : VersionChangeTransactionOp(aTransaction)
     , mMetadata(aMetadata)
   {
     MOZ_ASSERT(aMetadata.id());
   }
 
-  ~CreateObjectStoreOp() = default;
-
-  virtual nsresult
+  ~CreateObjectStoreOp() override = default;
+
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 };
 
 class DeleteObjectStoreOp final
   : public VersionChangeTransactionOp
 {
   friend class VersionChangeTransaction;
 
@@ -7877,19 +7871,19 @@ private:
                       const bool aIsLastObjectStore)
     : VersionChangeTransactionOp(aTransaction)
     , mMetadata(aMetadata)
     , mIsLastObjectStore(aIsLastObjectStore)
   {
     MOZ_ASSERT(aMetadata->mCommonMetadata.id());
   }
 
-  ~DeleteObjectStoreOp() = default;
-
-  virtual nsresult
+  ~DeleteObjectStoreOp() override = default;
+
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 };
 
 class RenameObjectStoreOp final
   : public VersionChangeTransactionOp
 {
   friend class VersionChangeTransaction;
 
@@ -7902,19 +7896,19 @@ private:
                       FullObjectStoreMetadata* const aMetadata)
     : VersionChangeTransactionOp(aTransaction)
     , mId(aMetadata->mCommonMetadata.id())
     , mNewName(aMetadata->mCommonMetadata.name())
   {
     MOZ_ASSERT(mId);
   }
 
-  ~RenameObjectStoreOp() = default;
-
-  virtual nsresult
+  ~RenameObjectStoreOp() override = default;
+
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 };
 
 class CreateIndexOp final
   : public VersionChangeTransactionOp
 {
   friend class VersionChangeTransaction;
 
@@ -7933,28 +7927,28 @@ class CreateIndexOp final
   const uint64_t mObjectStoreId;
 
 private:
   // Only created by VersionChangeTransaction.
   CreateIndexOp(VersionChangeTransaction* aTransaction,
                 const int64_t aObjectStoreId,
                 const IndexMetadata& aMetadata);
 
-  ~CreateIndexOp() = default;
+  ~CreateIndexOp() override = default;
 
   nsresult
   InsertDataFromObjectStore(DatabaseConnection* aConnection);
 
   nsresult
   InsertDataFromObjectStoreInternal(DatabaseConnection* aConnection);
 
-  virtual bool
+  bool
   Init(TransactionBase* aTransaction) override;
 
-  virtual nsresult
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 };
 
 class NormalJSContext
 {
   friend class nsAutoPtr<NormalJSContext>;
 
   static const JSClass sGlobalClass;
@@ -8064,24 +8058,24 @@ class DeleteIndexOp final
 private:
   // Only created by VersionChangeTransaction.
   DeleteIndexOp(VersionChangeTransaction* aTransaction,
                 const int64_t aObjectStoreId,
                 const int64_t aIndexId,
                 const bool aUnique,
                 const bool aIsLastIndex);
 
-  ~DeleteIndexOp() = default;
+  ~DeleteIndexOp() override = default;
 
   nsresult
   RemoveReferencesToIndex(DatabaseConnection* aConnection,
                           const Key& aObjectDataKey,
                           nsTArray<IndexDataValue>& aIndexValues);
 
-  virtual nsresult
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 };
 
 class RenameIndexOp final
   : public VersionChangeTransactionOp
 {
   friend class VersionChangeTransaction;
 
@@ -8097,44 +8091,43 @@ private:
     : VersionChangeTransactionOp(aTransaction)
     , mObjectStoreId(aObjectStoreId)
     , mIndexId(aMetadata->mCommonMetadata.id())
     , mNewName(aMetadata->mCommonMetadata.name())
   {
     MOZ_ASSERT(mIndexId);
   }
 
-  ~RenameIndexOp() = default;
-
-  virtual nsresult
+  ~RenameIndexOp() override = default;
+
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 };
 
 class NormalTransactionOp
   : public TransactionDatabaseOperationBase
   , public PBackgroundIDBRequestParent
 {
 #ifdef DEBUG
   bool mResponseSent;
 #endif
 
 public:
-  virtual void
+  void
   Cleanup() override;
 
 protected:
   explicit NormalTransactionOp(TransactionBase* aTransaction)
     : TransactionDatabaseOperationBase(aTransaction)
 #ifdef DEBUG
     , mResponseSent(false)
 #endif
   { }
 
-  virtual
-  ~NormalTransactionOp() = default;
+  ~NormalTransactionOp() override = default;
 
   // An overload of DatabaseOperationBase's function that can avoid doing extra
   // work on non-versionchange transactions.
   static nsresult
   ObjectStoreHasIndexes(NormalTransactionOp* aOp,
                         DatabaseConnection* aConnection,
                         const int64_t aObjectStoreId,
                         const bool aMayHaveIndexes,
@@ -8144,30 +8137,30 @@ protected:
   GetPreprocessParams(PreprocessParams& aParams);
 
 
   // Subclasses use this override to set the IPDL response value.
   virtual void
   GetResponse(RequestResponse& aResponse) = 0;
 
 private:
-  virtual nsresult
+  nsresult
   SendPreprocessInfo() override;
 
-  virtual nsresult
+  nsresult
   SendSuccessResult() override;
 
-  virtual bool
+  bool
   SendFailureResult(nsresult aResultCode) override;
 
   // IPDL methods.
-  virtual void
+  void
   ActorDestroy(ActorDestroyReason aWhy) override;
 
-  virtual bool
+  bool
   RecvContinue(const PreprocessResponse& aResponse) override;
 };
 
 class ObjectStoreAddOrPutRequestOp final
   : public NormalTransactionOp
 {
   friend class TransactionBase;
 
@@ -8195,37 +8188,37 @@ class ObjectStoreAddOrPutRequestOp final
   bool mObjectStoreMayHaveIndexes;
   bool mDataOverThreshold;
 
 private:
   // Only created by TransactionBase.
   ObjectStoreAddOrPutRequestOp(TransactionBase* aTransaction,
                                const RequestParams& aParams);
 
-  ~ObjectStoreAddOrPutRequestOp() = default;
+  ~ObjectStoreAddOrPutRequestOp() override = default;
 
   nsresult
   RemoveOldIndexDataValues(DatabaseConnection* aConnection);
 
   nsresult
   CopyFileData(nsIInputStream* aInputStream,
                nsIOutputStream* aOutputStream,
                char* aBuffer,
                uint32_t aBufferSize);
 
-  virtual bool
+  bool
   Init(TransactionBase* aTransaction) override;
 
-  virtual nsresult
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 
-  virtual void
+  void
   GetResponse(RequestResponse& aResponse) override;
 
-  virtual void
+  void
   Cleanup() override;
 };
 
 struct ObjectStoreAddOrPutRequestOp::StoredFileInfo final
 {
   RefPtr<DatabaseFile> mFileActor;
   RefPtr<FileInfo> mFileInfo;
   nsCOMPtr<nsIInputStream> mInputStream;
@@ -8319,32 +8312,32 @@ class ObjectStoreGetRequestOp final
   const bool mGetAll;
 
 private:
   // Only created by TransactionBase.
   ObjectStoreGetRequestOp(TransactionBase* aTransaction,
                           const RequestParams& aParams,
                           bool aGetAll);
 
-  ~ObjectStoreGetRequestOp() = default;
+  ~ObjectStoreGetRequestOp() override = default;
 
   template <bool aForPreprocess, typename T>
   nsresult
   ConvertResponse(StructuredCloneReadInfo& aInfo, T& aResult);
 
-  virtual nsresult
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 
-  virtual bool
+  bool
   HasPreprocessInfo() override;
 
-  virtual nsresult
+  nsresult
   GetPreprocessParams(PreprocessParams& aParams) override;
 
-  virtual void
+  void
   GetResponse(RequestResponse& aResponse) override;
 };
 
 class ObjectStoreGetKeyRequestOp final
   : public NormalTransactionOp
 {
   friend class TransactionBase;
 
@@ -8355,44 +8348,44 @@ class ObjectStoreGetKeyRequestOp final
   FallibleTArray<Key> mResponse;
 
 private:
   // Only created by TransactionBase.
   ObjectStoreGetKeyRequestOp(TransactionBase* aTransaction,
                              const RequestParams& aParams,
                              bool aGetAll);
 
-  ~ObjectStoreGetKeyRequestOp() = default;
-
-  virtual nsresult
+  ~ObjectStoreGetKeyRequestOp() override = default;
+
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 
-  virtual void
+  void
   GetResponse(RequestResponse& aResponse) override;
 };
 
 class ObjectStoreDeleteRequestOp final
   : public NormalTransactionOp
 {
   friend class TransactionBase;
 
   const ObjectStoreDeleteParams mParams;
   ObjectStoreDeleteResponse mResponse;
   bool mObjectStoreMayHaveIndexes;
 
 private:
   ObjectStoreDeleteRequestOp(TransactionBase* aTransaction,
                              const ObjectStoreDeleteParams& aParams);
 
-  ~ObjectStoreDeleteRequestOp() = default;
-
-  virtual nsresult
+  ~ObjectStoreDeleteRequestOp() override = default;
+
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 
-  virtual void
+  void
   GetResponse(RequestResponse& aResponse) override
   {
     aResponse = Move(mResponse);
   }
 };
 
 class ObjectStoreClearRequestOp final
   : public NormalTransactionOp
@@ -8402,22 +8395,22 @@ class ObjectStoreClearRequestOp final
   const ObjectStoreClearParams mParams;
   ObjectStoreClearResponse mResponse;
   bool mObjectStoreMayHaveIndexes;
 
 private:
   ObjectStoreClearRequestOp(TransactionBase* aTransaction,
                             const ObjectStoreClearParams& aParams);
 
-  ~ObjectStoreClearRequestOp() = default;
-
-  virtual nsresult
+  ~ObjectStoreClearRequestOp() override = default;
+
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 
-  virtual void
+  void
   GetResponse(RequestResponse& aResponse) override
   {
     aResponse = Move(mResponse);
   }
 };
 
 class ObjectStoreCountRequestOp final
   : public NormalTransactionOp
@@ -8429,22 +8422,22 @@ class ObjectStoreCountRequestOp final
 
 private:
   ObjectStoreCountRequestOp(TransactionBase* aTransaction,
                             const ObjectStoreCountParams& aParams)
     : NormalTransactionOp(aTransaction)
     , mParams(aParams)
   { }
 
-  ~ObjectStoreCountRequestOp() = default;
-
-  virtual nsresult
+  ~ObjectStoreCountRequestOp() override = default;
+
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 
-  virtual void
+  void
   GetResponse(RequestResponse& aResponse) override
   {
     aResponse = Move(mResponse);
   }
 };
 
 class IndexRequestOpBase
   : public NormalTransactionOp
@@ -8454,18 +8447,18 @@ protected:
 
 protected:
   IndexRequestOpBase(TransactionBase* aTransaction,
                      const RequestParams& aParams)
     : NormalTransactionOp(aTransaction)
     , mMetadata(IndexMetadataForParams(aTransaction, aParams))
   { }
 
-  virtual
-  ~IndexRequestOpBase() = default;
+  
+  ~IndexRequestOpBase() override = default;
 
 private:
   static already_AddRefed<FullIndexMetadata>
   IndexMetadataForParams(TransactionBase* aTransaction,
                          const RequestParams& aParams);
 };
 
 class IndexGetRequestOp final
@@ -8481,22 +8474,22 @@ class IndexGetRequestOp final
   const bool mGetAll;
 
 private:
   // Only created by TransactionBase.
   IndexGetRequestOp(TransactionBase* aTransaction,
                     const RequestParams& aParams,
                     bool aGetAll);
 
-  ~IndexGetRequestOp() = default;
-
-  virtual nsresult
+  ~IndexGetRequestOp() override = default;
+
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 
-  virtual void
+  void
   GetResponse(RequestResponse& aResponse) override;
 };
 
 class IndexGetKeyRequestOp final
   : public IndexRequestOpBase
 {
   friend class TransactionBase;
 
@@ -8506,22 +8499,22 @@ class IndexGetKeyRequestOp final
   const bool mGetAll;
 
 private:
   // Only created by TransactionBase.
   IndexGetKeyRequestOp(TransactionBase* aTransaction,
                        const RequestParams& aParams,
                        bool aGetAll);
 
-  ~IndexGetKeyRequestOp() = default;
-
-  virtual nsresult
+  ~IndexGetKeyRequestOp() override = default;
+
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 
-  virtual void
+  void
   GetResponse(RequestResponse& aResponse) override;
 };
 
 class IndexCountRequestOp final
   : public IndexRequestOpBase
 {
   friend class TransactionBase;
 
@@ -8531,22 +8524,22 @@ class IndexCountRequestOp final
 private:
   // Only created by TransactionBase.
   IndexCountRequestOp(TransactionBase* aTransaction,
                       const RequestParams& aParams)
     : IndexRequestOpBase(aTransaction, aParams)
     , mParams(aParams.get_IndexCountParams())
   { }
 
-  ~IndexCountRequestOp() = default;
-
-  virtual nsresult
+  ~IndexCountRequestOp() override = default;
+
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 
-  virtual void
+  void
   GetResponse(RequestResponse& aResponse) override
   {
     aResponse = Move(mResponse);
   }
 };
 
 class Cursor final :
     public PBackgroundIDBCursorParent
@@ -8601,17 +8594,17 @@ private:
   // Only created by TransactionBase.
   Cursor(TransactionBase* aTransaction,
          Type aType,
          FullObjectStoreMetadata* aObjectStoreMetadata,
          FullIndexMetadata* aIndexMetadata,
          Direction aDirection);
 
   // Reference counted.
-  ~Cursor()
+  ~Cursor() override
   {
     MOZ_ASSERT(mActorDestroyed);
   }
 
   bool
   VerifyRequestParams(const CursorRequestParams& aParams) const;
 
   // Only called by TransactionBase.
@@ -8623,23 +8616,23 @@ private:
     CursorResponse& aResponse,
     const nsTArray<FallibleTArray<StructuredCloneFile>>& aFiles);
 
   // Must call SendResponseInternal!
   bool
   SendResponse(const CursorResponse& aResponse) = delete;
 
   // IPDL methods.
-  virtual void
+  void
   ActorDestroy(ActorDestroyReason aWhy) override;
 
-  virtual bool
+  bool
   RecvDeleteMe() override;
 
-  virtual bool
+  bool
   RecvContinue(const CursorRequestParams& aParams) override;
 
   bool
   IsLocaleAware() const {
     return !mLocale.IsEmpty();
   }
 };
 
@@ -8663,23 +8656,23 @@ protected:
 #ifdef DEBUG
     , mResponseSent(false)
 #endif
   {
     AssertIsOnBackgroundThread();
     MOZ_ASSERT(aCursor);
   }
 
-  virtual
-  ~CursorOpBase() = default;
-
-  virtual bool
+  
+  ~CursorOpBase() override = default;
+
+  bool
   SendFailureResult(nsresult aResultCode) override;
 
-  virtual void
+  void
   Cleanup() override;
 
   nsresult
   PopulateResponseFromStatement(DatabaseConnection::CachedStatement& aStmt,
                                 bool aInitializeResponse);
 };
 
 class Cursor::OpenOp final
@@ -8693,37 +8686,37 @@ private:
   // Only created by Cursor.
   OpenOp(Cursor* aCursor,
          const OptionalKeyRange& aOptionalKeyRange)
     : CursorOpBase(aCursor)
     , mOptionalKeyRange(aOptionalKeyRange)
   { }
 
   // Reference counted.
-  ~OpenOp() = default;
+  ~OpenOp() override = default;
 
   void
   GetRangeKeyInfo(bool aLowerBound, Key* aKey, bool* aOpen);
 
   nsresult
   DoObjectStoreDatabaseWork(DatabaseConnection* aConnection);
 
   nsresult
   DoObjectStoreKeyDatabaseWork(DatabaseConnection* aConnection);
 
   nsresult
   DoIndexDatabaseWork(DatabaseConnection* aConnection);
 
   nsresult
   DoIndexKeyDatabaseWork(DatabaseConnection* aConnection);
 
-  virtual nsresult
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 
-  virtual nsresult
+  nsresult
   SendSuccessResult() override;
 };
 
 class Cursor::ContinueOp final
   : public Cursor::CursorOpBase
 {
   friend class Cursor;
 
@@ -8735,22 +8728,22 @@ private:
              const CursorRequestParams& aParams)
     : CursorOpBase(aCursor)
     , mParams(aParams)
   {
     MOZ_ASSERT(aParams.type() != CursorRequestParams::T__None);
   }
 
   // Reference counted.
-  ~ContinueOp() = default;
-
-  virtual nsresult
+  ~ContinueOp() override = default;
+
+  nsresult
   DoDatabaseWork(DatabaseConnection* aConnection) override;
 
-  virtual nsresult
+  nsresult
   SendSuccessResult() override;
 };
 
 class Utils final
   : public PBackgroundIndexedDBUtilsParent
 {
 #ifdef DEBUG
   bool mActorDestroyed;
@@ -8758,26 +8751,26 @@ class Utils final
 
 public:
   Utils();
 
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(mozilla::dom::indexedDB::Utils)
 
 private:
   // Reference counted.
-  ~Utils();
+  ~Utils() override;
 
   // IPDL methods are only called by IPDL.
-  virtual void
+  void
   ActorDestroy(ActorDestroyReason aWhy) override;
 
-  virtual bool
+  bool
   RecvDeleteMe() override;
 
-  virtual bool
+  bool
   RecvGetFileReferences(const PersistenceType& aPersistenceType,
                         const nsCString& aOrigin,
                         const nsString& aDatabaseName,
                         const int64_t& aFileId,
                         int32_t* aRefCnt,
                         int32_t* aDBRefCnt,
                         int32_t* aSliceRefCnt,
                         bool* aResult) override;
@@ -8819,26 +8812,26 @@ public:
 
   nsresult
   DispatchAndReturnFileReferences(int32_t* aMemRefCnt,
                                   int32_t* aDBRefCnt,
                                   int32_t* aSliceRefCnt,
                                   bool* aResult);
 
 private:
-  ~GetFileReferencesHelper() = default;
+  ~GetFileReferencesHelper() override = default;
 
   NS_DECL_NSIRUNNABLE
 };
 
 class FlushPendingFileDeletionsRunnable final
   : public Runnable
 {
 private:
-  ~FlushPendingFileDeletionsRunnable() = default;
+  ~FlushPendingFileDeletionsRunnable() override = default;
 
   NS_DECL_NSIRUNNABLE
 };
 
 class PermissionRequestHelper final
   : public PermissionRequestBase
   , public PIndexedDBPermissionRequestParent
 {
@@ -8847,23 +8840,23 @@ class PermissionRequestHelper final
 public:
   PermissionRequestHelper(Element* aOwnerElement,
                           nsIPrincipal* aPrincipal)
     : PermissionRequestBase(aOwnerElement, aPrincipal)
     , mActorDestroyed(false)
   { }
 
 protected:
-  ~PermissionRequestHelper() = default;
-
-private:
-  virtual void
+  ~PermissionRequestHelper() override = default;
+
+private:
+  void
   OnPromptComplete(PermissionValue aPermissionValue) override;
 
-  virtual void
+  void
   ActorDestroy(ActorDestroyReason aWhy) override;
 };
 
 /*******************************************************************************
  * Other class declarations
  ******************************************************************************/
 
 struct DatabaseActorInfo final
@@ -8997,22 +8990,22 @@ public:
   GetFileInfo() const
   {
     AssertIsOnBackgroundThread();
 
     return mFileInfo;
   }
 
 private:
-  ~BlobImplStoredFile() = default;
+  ~BlobImplStoredFile() override = default;
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECLARE_STATIC_IID_ACCESSOR(BLOB_IMPL_STORED_FILE_IID)
 
-  virtual int64_t
+  int64_t
   GetFileId() override
   {
     MOZ_ASSERT(mFileInfo);
 
     return mFileInfo->Id();
   }
 };
 
@@ -9093,62 +9086,62 @@ public:
     ProcessMaintenanceQueue();
   }
 
   nsThreadPool*
   GetOrCreateThreadPool();
 
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(QuotaClient, override)
 
-  virtual mozilla::dom::quota::Client::Type
+  mozilla::dom::quota::Client::Type
   GetType() override;
 
-  virtual nsresult
+  nsresult
   InitOrigin(PersistenceType aPersistenceType,
              const nsACString& aGroup,
              const nsACString& aOrigin,
              UsageInfo* aUsageInfo) override;
 
-  virtual nsresult
+  nsresult
   GetUsageForOrigin(PersistenceType aPersistenceType,
                     const nsACString& aGroup,
                     const nsACString& aOrigin,
                     UsageInfo* aUsageInfo) override;
 
-  virtual void
+  void
   OnOriginClearCompleted(PersistenceType aPersistenceType,
                          const nsACString& aOrigin)
                          override;
 
-  virtual void
+  void
   ReleaseIOThreadObjects() override;
 
-  virtual void
+  void
   AbortOperations(const nsACString& aOrigin) override;
 
-  virtual void
+  void
   AbortOperationsForProcess(ContentParentId aContentParentId) override;
 
-  virtual void
+  void
   StartIdleMaintenance() override;
 
-  virtual void
+  void
   StopIdleMaintenance() override;
 
-  virtual void
+  void
   ShutdownWorkThreads() override;
 
-  virtual void
+  void
   DidInitialize(QuotaManager* aQuotaManager) override;
 
-  virtual void
+  void
   WillShutdown() override;
 
 private:
-  ~QuotaClient();
+  ~QuotaClient() override;
 
   nsresult
   GetDirectory(PersistenceType aPersistenceType,
                const nsACString& aOrigin,
                nsIFile** aDirectory);
 
   nsresult
   GetUsageForDirectoryInternal(nsIFile* aDirectory,
@@ -9278,17 +9271,17 @@ public:
     AssertIsOnBackgroundThread();
 
     RefPtr<DatabaseMaintenance> result =
       mDatabaseMaintenances.Get(aDatabasePath);
     return result.forget();
   }
 
 private:
-  ~Maintenance()
+  ~Maintenance() override
   {
     MOZ_ASSERT(mState == State::Complete);
     MOZ_ASSERT(!mDatabaseMaintenances.Count());
   }
 
   // Runs on the PBackground thread. Checks if IndexedDatabaseManager is
   // running. Calls OpenDirectory() or dispatches to the main thread on which
   // CreateIndexedDatabaseManager() is called.
@@ -9324,20 +9317,20 @@ private:
   void
   Finish();
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_NSIRUNNABLE
 
   // OpenDirectoryListener overrides.
-  virtual void
+  void
   DirectoryLockAcquired(DirectoryLock* aLock) override;
 
-  virtual void
+  void
   DirectoryLockFailed() override;
 };
 
 struct Maintenance::DirectoryInfo final
 {
   const nsCString mGroup;
   const nsCString mOrigin;
   nsTArray<nsString> mDatabasePaths;
@@ -9453,17 +9446,17 @@ public:
   {
     AssertIsOnBackgroundThread();
     MOZ_ASSERT(!mCompleteCallback);
 
     mCompleteCallback = aCallback;
   }
 
 private:
-  ~DatabaseMaintenance() = default;
+  ~DatabaseMaintenance() override = default;
 
   // Runs on maintenance thread pool. Does maintenance on the database.
   void
   PerformMaintenanceOnDatabase();
 
   // Runs on maintenance thread pool as part of PerformMaintenanceOnDatabase.
   nsresult
   CheckIntegrity(mozIStorageConnection* aConnection, bool* aOk);
@@ -11369,18 +11362,18 @@ UpdateRefcountFunction::Reset()
 
   class MOZ_STACK_CLASS CustomCleanupCallback final
     : public FileInfo::CustomCleanupCallback
   {
     nsCOMPtr<nsIFile> mDirectory;
     nsCOMPtr<nsIFile> mJournalDirectory;
 
   public:
-    virtual nsresult
-    Cleanup(FileManager* aFileManager, int64_t aId)
+    nsresult
+    Cleanup(FileManager* aFileManager, int64_t aId) override
     {
       if (!mDirectory) {
         MOZ_ASSERT(!mJournalDirectory);
 
         mDirectory = aFileManager->GetDirectory();
         if (NS_WARN_IF(!mDirectory)) {
           return NS_ERROR_FAILURE;
         }
--- a/dom/ipc/Blob.cpp
+++ b/dom/ipc/Blob.cpp
@@ -236,17 +236,17 @@ public:
   {
     MOZ_ASSERT(aRunnable);
     MOZ_ASSERT(aEventTarget);
   }
 
   NS_DECL_ISUPPORTS_INHERITED
 
 private:
-  ~CancelableRunnableWrapper() = default;
+  ~CancelableRunnableWrapper() override = default;
 
   NS_DECL_NSIRUNNABLE
   nsresult Cancel() override;
 };
 
 NS_IMPL_ISUPPORTS_INHERITED0(CancelableRunnableWrapper, CancelableRunnable)
 
 NS_IMETHODIMP
@@ -549,17 +549,17 @@ private:
   bool
   IsFileMetadata();
 
   NS_DECL_NSIINPUTSTREAM
   NS_DECL_NSISEEKABLESTREAM
   NS_DECL_NSIIPCSERIALIZABLEINPUTSTREAM
   NS_DECL_NSIFILEMETADATA
 
-  virtual nsIInputStream*
+  nsIInputStream*
   BlockAndGetInternalStream() override;
 };
 
 class InputStreamChild final
   : public PBlobStreamChild
 {
   RefPtr<RemoteInputStream> mRemoteStream;
 
@@ -570,21 +570,21 @@ public:
   {
     MOZ_ASSERT(aRemoteStream);
     aRemoteStream->AssertIsOnOwningThread();
   }
 
   InputStreamChild()
   { }
 
-  ~InputStreamChild() = default;
+  ~InputStreamChild() override = default;
 
 private:
   // This method is only called by the IPDL message machinery.
-  virtual bool
+  bool
   Recv__delete__(const InputStreamParams& aParams,
                  const OptionalFileDescriptorSet& aFDs) override;
 };
 
 class InputStreamParent final
   : public PBlobStreamParent
 {
   typedef mozilla::ipc::InputStreamParams InputStreamParams;
@@ -628,17 +628,17 @@ public:
     MOZ_ASSERT(aSyncLoopGuard);
     MOZ_ASSERT(!*aSyncLoopGuard);
     MOZ_ASSERT(aParams);
     MOZ_ASSERT(aFDs);
 
     MOZ_COUNT_CTOR(InputStreamParent);
   }
 
-  ~InputStreamParent()
+  ~InputStreamParent() override
   {
     AssertIsOnOwningThread();
 
     MOZ_COUNT_DTOR(InputStreamParent);
   }
 
   void
   AssertIsOnOwningThread() const
@@ -667,17 +667,17 @@ public:
     }
 
     // This will be destroyed by BlobParent::DeallocPBlobStreamParent.
     return PBlobStreamParent::Send__delete__(this, aParams, aFDs);
   }
 
 private:
   // This method is only called by the IPDL message machinery.
-  virtual void
+  void
   ActorDestroy(ActorDestroyReason aWhy) override
   {
     // Nothing needs to be done here.
   }
 };
 
 struct MOZ_STACK_CLASS CreateBlobImplMetadata final
 {
@@ -1611,17 +1611,17 @@ public:
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
   NS_DECL_ISUPPORTS_INHERITED
 
 private:
-  ~OpenStreamRunnable() = default;
+  ~OpenStreamRunnable() override = default;
 
   bool
   IsOnOwningThread() const
   {
     return EventTargetIsOnCurrentThread(mActorTarget);
   }
 
   void
@@ -1876,47 +1876,47 @@ public:
   RemoteBlobSliceImpl*
   AsSlice() const;
 
   RemoteBlobImpl*
   BaseRemoteBlobImpl() const;
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  virtual void
+  void
   GetMozFullPathInternal(nsAString& aFileName, ErrorResult& aRv) const override;
 
-  virtual bool
+  bool
   IsDirectory() const override;
 
-  virtual already_AddRefed<BlobImpl>
+  already_AddRefed<BlobImpl>
   CreateSlice(uint64_t aStart,
               uint64_t aLength,
               const nsAString& aContentType,
               ErrorResult& aRv) override;
 
-  virtual void
+  void
   GetInternalStream(nsIInputStream** aStream, ErrorResult& aRv) override;
 
-  virtual int64_t
+  int64_t
   GetFileId() override;
 
-  virtual int64_t
+  int64_t
   GetLastModified(ErrorResult& aRv) override;
 
-  virtual void
+  void
   SetLastModified(int64_t aLastModified) override;
 
-  virtual nsresult
+  nsresult
   SetMutable(bool aMutable) override;
 
-  virtual BlobChild*
+  BlobChild*
   GetBlobChild() override;
 
-  virtual BlobParent*
+  BlobParent*
   GetBlobParent() override;
 
   void
   NullifyDifferentProcessBlobImpl()
   {
     MOZ_ASSERT(mDifferentProcessBlobImpl);
     mDifferentProcessBlobImpl = nullptr;
   }
@@ -1930,17 +1930,17 @@ public:
 
   void
   WorkerHasNotified();
 
 protected:
   // For SliceImpl.
   RemoteBlobImpl(const nsAString& aContentType, uint64_t aLength);
 
-  ~RemoteBlobImpl()
+  ~RemoteBlobImpl() override
   {
     MOZ_ASSERT_IF(mActorTarget,
                   EventTargetIsOnCurrentThread(mActorTarget));
   }
 
   void
   CommonInit(BlobChild* aActor);
 
@@ -1982,17 +1982,17 @@ public:
   explicit CreateStreamHelper(RemoteBlobImpl* aRemoteBlobImpl);
 
   nsresult
   GetStream(nsIInputStream** aInputStream);
 
   NS_IMETHOD Run() override;
 
 private:
-  ~CreateStreamHelper()
+  ~CreateStreamHelper() override
   {
     MOZ_ASSERT(!mRemoteBlobImpl);
     MOZ_ASSERT(!mInputStream);
     MOZ_ASSERT(mDone);
   }
 
   void
   RunInternal(RemoteBlobImpl* aBaseRemoteBlobImpl, bool aNotify);
@@ -2032,21 +2032,21 @@ public:
 
     if (!mActorWasCreated) {
       EnsureActorWasCreatedInternal();
     }
   }
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  virtual BlobChild*
+  BlobChild*
   GetBlobChild() override;
 
 private:
-  ~RemoteBlobSliceImpl() = default;
+  ~RemoteBlobSliceImpl() override = default;
 
   void
   EnsureActorWasCreatedInternal();
 };
 
 /*******************************************************************************
  * BlobParent::RemoteBlobImpl Declaration
  ******************************************************************************/
@@ -2062,105 +2062,105 @@ class BlobParent::RemoteBlobImpl final
 public:
   RemoteBlobImpl(BlobParent* aActor, BlobImpl* aBlobImpl);
 
   void
   NoteDyingActor();
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  virtual void
+  void
   GetName(nsAString& aName) const override;
 
-  virtual void
+  void
   GetPath(nsAString& aPath) const override;
 
-  virtual void
+  void
   SetPath(const nsAString& aPath) override;
 
-  virtual int64_t
+  int64_t
   GetLastModified(ErrorResult& aRv) override;
 
-  virtual void
+  void
   SetLastModified(int64_t aLastModified) override;
 
-  virtual void
+  void
   GetMozFullPath(nsAString& aName, ErrorResult& aRv) const override;
 
-  virtual void
+  void
   GetMozFullPathInternal(nsAString& aFileName, ErrorResult& aRv) const override;
 
-  virtual bool
+  bool
   IsDirectory() const override;
 
-  virtual uint64_t
+  uint64_t
   GetSize(ErrorResult& aRv) override;
 
-  virtual void
+  void
   GetType(nsAString& aType) override;
 
-  virtual uint64_t
+  uint64_t
   GetSerialNumber() const override;
 
-  virtual already_AddRefed<BlobImpl>
+  already_AddRefed<BlobImpl>
   CreateSlice(uint64_t aStart,
               uint64_t aLength,
               const nsAString& aContentType,
               ErrorResult& aRv) override;
 
-  virtual const nsTArray<RefPtr<BlobImpl>>*
+  const nsTArray<RefPtr<BlobImpl>>*
   GetSubBlobImpls() const override;
 
-  virtual void
+  void
   GetInternalStream(nsIInputStream** aStream, ErrorResult& aRv) override;
 
-  virtual int64_t
+  int64_t
   GetFileId() override;
 
-  virtual nsresult
+  nsresult
   GetSendInfo(nsIInputStream** aBody,
               uint64_t* aContentLength,
               nsACString& aContentType,
               nsACString& aCharset) override;
 
-  virtual nsresult
+  nsresult
   GetMutable(bool* aMutable) const override;
 
-  virtual nsresult
+  nsresult
   SetMutable(bool aMutable) override;
 
-  virtual void
+  void
   SetLazyData(const nsAString& aName,
               const nsAString& aContentType,
               uint64_t aLength,
               int64_t aLastModifiedDate) override;
 
-  virtual bool
+  bool
   IsMemoryFile() const override;
 
-  virtual bool
+  bool
   IsSizeUnknown() const override;
 
-  virtual bool
+  bool
   IsDateUnknown() const override;
 
-  virtual bool
+  bool
   IsFile() const override;
 
-  virtual bool
+  bool
   MayBeClonedToOtherThreads() const override;
 
-  virtual BlobChild*
+  BlobChild*
   GetBlobChild() override;
 
-  virtual BlobParent*
+  BlobParent*
   GetBlobParent() override;
 
 private:
-  ~RemoteBlobImpl()
+  ~RemoteBlobImpl() override
   {
     MOZ_ASSERT_IF(mActorTarget,
                   EventTargetIsOnCurrentThread(mActorTarget));
   }
 
   void
   Destroy();
 };
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -227,17 +227,17 @@ class MemoryReportRequestChild : public 
 public:
   NS_DECL_ISUPPORTS
 
   MemoryReportRequestChild(bool aAnonymize,
                            const MaybeFileDesc& aDMDFile);
   NS_IMETHOD Run() override;
 
 private:
-  virtual ~MemoryReportRequestChild();
+  ~MemoryReportRequestChild() override;
 
   bool     mAnonymize;
   FileDescriptor mDMDFile;
 };
 
 NS_IMPL_ISUPPORTS(MemoryReportRequestChild, nsIRunnable)
 
 MemoryReportRequestChild::MemoryReportRequestChild(
@@ -324,17 +324,17 @@ public:
   }
 
   NS_IMETHOD GetCcLog(nsIFile** aPath) override
   {
     return UnimplementedProperty();
   }
 
 private:
-  ~CycleCollectWithLogsChild()
+  ~CycleCollectWithLogsChild() override
   {
     if (mGCLog) {
       fclose(mGCLog);
       mGCLog = nullptr;
     }
     if (mCCLog) {
       fclose(mCCLog);
       mCCLog = nullptr;
@@ -473,23 +473,23 @@ public:
   BackgroundChildPrimer()
   { }
 
   NS_DECL_ISUPPORTS
 
 private:
   ~BackgroundChildPrimer() = default;
 
-  virtual void
+  void
   ActorCreated(PBackgroundChild* aActor) override
   {
     MOZ_ASSERT(aActor, "Failed to create a PBackgroundChild actor!");
   }
 
-  virtual void
+  void
   ActorFailed() override
   {
     MOZ_CRASH("Failed to create a PBackgroundChild actor!");
   }
 };
 
 NS_IMPL_ISUPPORTS(BackgroundChildPrimer, nsIIPCBackgroundChildCreateCallback)
 
--- a/dom/ipc/ProcessHangMonitor.cpp
+++ b/dom/ipc/ProcessHangMonitor.cpp
@@ -71,17 +71,17 @@ namespace {
 
 /* Child process objects */
 
 class HangMonitorChild
   : public PProcessHangMonitorChild
 {
  public:
   explicit HangMonitorChild(ProcessHangMonitor* aMonitor);
-  virtual ~HangMonitorChild();
+  ~HangMonitorChild() override;
 
   void Open(Transport* aTransport, ProcessId aOtherPid,
             MessageLoop* aIOLoop);
 
   typedef ProcessHangMonitor::SlowScriptAction SlowScriptAction;
   SlowScriptAction NotifySlowScript(nsITabChild* aTabChild,
                                     const char* aFileName,
                                     unsigned aLineNo);
@@ -93,23 +93,23 @@ class HangMonitorChild
 
   void NotifyPluginHang(uint32_t aPluginId);
   void NotifyPluginHangAsync(uint32_t aPluginId);
 
   void ClearHang();
   void ClearHangAsync();
   void ClearForcePaint();
 
-  virtual bool RecvTerminateScript() override;
-  virtual bool RecvBeginStartingDebugger() override;
-  virtual bool RecvEndStartingDebugger() override;
+  bool RecvTerminateScript() override;
+  bool RecvBeginStartingDebugger() override;
+  bool RecvEndStartingDebugger() override;
 
-  virtual bool RecvForcePaint(const TabId& aTabId, const uint64_t& aLayerObserverEpoch) override;
+  bool RecvForcePaint(const TabId& aTabId, const uint64_t& aLayerObserverEpoch) override;
 
-  virtual void ActorDestroy(ActorDestroyReason aWhy) override;
+  void ActorDestroy(ActorDestroyReason aWhy) override;
 
   void InterruptCallback();
   void Shutdown();
 
   static HangMonitorChild* Get() { return sInstance; }
 
   MessageLoop* MonitorLoop() { return mHangMonitor->MonitorLoop(); }
 
@@ -204,24 +204,24 @@ private:
   nsAutoString mDumpId;
 };
 
 class HangMonitorParent
   : public PProcessHangMonitorParent
 {
 public:
   explicit HangMonitorParent(ProcessHangMonitor* aMonitor);
-  virtual ~HangMonitorParent();
+  ~HangMonitorParent() override;
 
   void Open(Transport* aTransport, ProcessId aPid, MessageLoop* aIOLoop);
 
-  virtual bool RecvHangEvidence(const HangData& aHangData) override;
-  virtual bool RecvClearHang() override;
+  bool RecvHangEvidence(const HangData& aHangData) override;
+  bool RecvClearHang() override;
 
-  virtual void ActorDestroy(ActorDestroyReason aWhy) override;
+  void ActorDestroy(ActorDestroyReason aWhy) override;
 
   void SetProcess(HangMonitoredProcess* aProcess) { mProcess = aProcess; }
 
   void Shutdown();
 
   void ForcePaint(dom::TabParent* aTabParent, uint64_t aLayerObserverEpoch);
 
   void TerminateScript();
--- a/dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp
+++ b/dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp
@@ -110,46 +110,46 @@ struct EncodedFrame {
 
 class FakeEncoderTask : public GMPTask {
  public:
   FakeEncoderTask(FakeVideoEncoder* encoder,
                   GMPVideoi420Frame* frame,
                   GMPVideoFrameType type)
       : encoder_(encoder), frame_(frame), type_(type) {}
 
-  virtual void Run();
-  virtual void Destroy() { delete this; }
+  void Run() override;
+  void Destroy() override { delete this; }
 
   FakeVideoEncoder* encoder_;
   GMPVideoi420Frame* frame_;
   GMPVideoFrameType type_;
 };
 
 class FakeVideoEncoder : public GMPVideoEncoder {
  public:
   explicit FakeVideoEncoder (GMPVideoHost* hostAPI) :
     host_ (hostAPI),
     callback_ (NULL) {}
 
-  virtual void InitEncode (const GMPVideoCodec& codecSettings,
-                             const uint8_t* aCodecSpecific,
-                             uint32_t aCodecSpecificSize,
-                             GMPVideoEncoderCallback* callback,
-                             int32_t numberOfCores,
-                             uint32_t maxPayloadSize) {
+  void InitEncode (const GMPVideoCodec& codecSettings,
+                   const uint8_t* aCodecSpecific,
+                   uint32_t aCodecSpecificSize,
+                   GMPVideoEncoderCallback* callback,
+                   int32_t numberOfCores,
+                   uint32_t maxPayloadSize) override {
     callback_ = callback;
 
     GMPLOG (GL_INFO, "Initialized encoder");
   }
 
-  virtual void Encode (GMPVideoi420Frame* inputImage,
-                         const uint8_t* aCodecSpecificInfo,
-                         uint32_t aCodecSpecificInfoLength,
-                         const GMPVideoFrameType* aFrameTypes,
-                         uint32_t aFrameTypesLength) {
+  void Encode (GMPVideoi420Frame* inputImage,
+               const uint8_t* aCodecSpecificInfo,
+               uint32_t aCodecSpecificInfoLength,
+               const GMPVideoFrameType* aFrameTypes,
+               uint32_t aFrameTypesLength) override {
     GMPLOG (GL_DEBUG,
             __FUNCTION__
             << " size="
             << inputImage->Width() << "x" << inputImage->Height());
 
     assert (aFrameTypesLength != 0);
 
     g_platform_api->runonmainthread(new FakeEncoderTask(this,
@@ -228,26 +228,26 @@ class FakeVideoEncoder : public GMPVideo
     info.mCodecType = kGMPVideoCodecH264;
     info.mBufferType = GMP_BufferLength32;
     info.mCodecSpecific.mH264.mSimulcastIdx = 0;
     GMPLOG (GL_DEBUG, "Calling callback");
     callback_->Encoded (f, reinterpret_cast<uint8_t*> (&info), sizeof(info));
     GMPLOG (GL_DEBUG, "Callback called");
   }
 
-  virtual void SetChannelParameters (uint32_t aPacketLoss, uint32_t aRTT) {
+  void SetChannelParameters (uint32_t aPacketLoss, uint32_t aRTT) override {
   }
 
-  virtual void SetRates (uint32_t aNewBitRate, uint32_t aFrameRate) {
+  void SetRates (uint32_t aNewBitRate, uint32_t aFrameRate) override {
   }
 
-  virtual void SetPeriodicKeyFrames (bool aEnable) {
+  void SetPeriodicKeyFrames (bool aEnable) override {
   }
 
-  virtual void EncodingComplete() {
+  void EncodingComplete() override {
     delete this;
   }
 
  private:
   uint8_t AveragePlane(uint8_t* ptr, size_t len) {
     uint64_t val = 0;
 
     for (size_t i=0; i<len; ++i) {
@@ -268,60 +268,60 @@ void FakeEncoderTask::Run() {
 
 class FakeDecoderTask : public GMPTask {
  public:
   FakeDecoderTask(FakeVideoDecoder* decoder,
                   GMPVideoEncodedFrame* frame,
                   int64_t time)
       : decoder_(decoder), frame_(frame), time_(time) {}
 
-  virtual void Run();
-  virtual void Destroy() { delete this; }
+  void Run() override;
+  void Destroy() override { delete this; }
 
   FakeVideoDecoder* decoder_;
   GMPVideoEncodedFrame* frame_;
   int64_t time_;
 };
 
 class FakeVideoDecoder : public GMPVideoDecoder {
  public:
   explicit FakeVideoDecoder (GMPVideoHost* hostAPI) :
     host_ (hostAPI),
     callback_ (NULL) {}
 
-  virtual ~FakeVideoDecoder() = default;
+  ~FakeVideoDecoder() override = default;
 
-  virtual void InitDecode (const GMPVideoCodec& codecSettings,
-                             const uint8_t* aCodecSpecific,
-                             uint32_t aCodecSpecificSize,
-                             GMPVideoDecoderCallback* callback,
-                             int32_t coreCount) {
+  void InitDecode (const GMPVideoCodec& codecSettings,
+                   const uint8_t* aCodecSpecific,
+                   uint32_t aCodecSpecificSize,
+                   GMPVideoDecoderCallback* callback,
+                   int32_t coreCount) override {
     GMPLOG (GL_INFO, "InitDecode");
 
     callback_ = callback;
   }
 
-  virtual void Decode (GMPVideoEncodedFrame* inputFrame,
-                         bool missingFrames,
-                         const uint8_t* aCodecSpecificInfo,
-                         uint32_t aCodecSpecificInfoLength,
-                         int64_t renderTimeMs = -1) {
+  void Decode (GMPVideoEncodedFrame* inputFrame,
+               bool missingFrames,
+               const uint8_t* aCodecSpecificInfo,
+               uint32_t aCodecSpecificInfoLength,
+               int64_t renderTimeMs = -1) override {
     GMPLOG (GL_DEBUG, __FUNCTION__
             << "Decoding frame size=" << inputFrame->Size()
             << " timestamp=" << inputFrame->TimeStamp());
     g_platform_api->runonmainthread(new FakeDecoderTask(this, inputFrame, renderTimeMs));
   }
 
-  virtual void Reset() {
+  void Reset() override {
   }
 
-  virtual void Drain() {
+  void Drain() override {
   }
 
-  virtual void DecodingComplete() {
+  void DecodingComplete() override {
     delete this;
   }
 
   // Return the decoded data back to the parent.
   void Decode_m (GMPVideoEncodedFrame* inputFrame,
                  int64_t renderTimeMs) {
     EncodedFrame *eframe;
     if (inputFrame->Size() != (sizeof(*eframe))) {
--- a/dom/media/gmp-plugin/gmp-test-decryptor.cpp
+++ b/dom/media/gmp-plugin/gmp-test-decryptor.cpp
@@ -272,17 +272,17 @@ class OpenedSecondTimeContinuation : pub
 public:
   explicit OpenedSecondTimeContinuation(GMPRecord* aRecord,
                                         TestManager* aTestManager,
                                         const string& aTestID)
     : mRecord(aRecord), mTestmanager(aTestManager), mTestID(aTestID) {
     MOZ_ASSERT(aRecord);
   }
 
-  virtual void OpenComplete(GMPErr aStatus, GMPRecord* aRecord) override {
+  void OpenComplete(GMPErr aStatus, GMPRecord* aRecord) override {
     if (GMP_SUCCEEDED(aStatus)) {
       FakeDecryptor::Message("FAIL OpenSecondTimeContinuation should not be able to re-open record.");
     }
     if (aRecord) {
       aRecord->Close();
     }
     // Succeeded, open should have failed.
     mTestmanager->EndTest(mTestID);
@@ -297,17 +297,17 @@ private:
 
 class OpenedFirstTimeContinuation : public OpenContinuation {
 public:
   OpenedFirstTimeContinuation(const string& aID,
                               TestManager* aTestManager,
                               const string& aTestID)
     : mID(aID), mTestmanager(aTestManager), mTestID(aTestID) {}
 
-  virtual void OpenComplete(GMPErr aStatus, GMPRecord* aRecord) override {
+  void OpenComplete(GMPErr aStatus, GMPRecord* aRecord) override {
     if (GMP_FAILED(aStatus)) {
       FakeDecryptor::Message("FAIL OpenAgainContinuation to open record initially.");
       mTestmanager->EndTest(mTestID);
       if (aRecord) {
         aRecord->Close();
       }
       return;
     }
@@ -374,18 +374,18 @@ DoTestStorage(const string& aPrefix, Tes
   auto task3 = new OpenedFirstTimeContinuation(id3, aTestManager, testID3);
   GMPOpenRecord(id3, task3);
 }
 
 class TestStorageTask : public GMPTask {
 public:
   TestStorageTask(const string& aPrefix, TestManager* aTestManager)
     : mPrefix(aPrefix), mTestManager(aTestManager) {}
-  virtual void Destroy() { delete this; }
-  virtual void Run() {
+  void Destroy() override { delete this; }
+  void Run() override {
     DoTestStorage(mPrefix, mTestManager);
   }
 private:
   const string mPrefix;
   TestManager* const mTestManager;
 };
 
 void
@@ -575,20 +575,20 @@ FakeDecryptor::UpdateSession(uint32_t aP
 }
 
 class CompleteShutdownTask : public GMPTask {
 public:
   explicit CompleteShutdownTask(GMPAsyncShutdownHost* aHost)
     : mHost(aHost)
   {
   }
-  virtual void Run() {
+  void Run() override {
     mHost->ShutdownComplete();
   }
-  virtual void Destroy() { delete this; }
+  void Destroy() override { delete this; }
   GMPAsyncShutdownHost* mHost;
 };
 
 void
 TestAsyncShutdown::BeginShutdown() {
   switch (sShutdownMode) {
     case ShutdownNormal:
       mHost->ShutdownComplete();
--- a/dom/media/gmp/GMPLoader.cpp
+++ b/dom/media/gmp/GMPLoader.cpp
@@ -23,17 +23,17 @@ namespace mozilla {
 namespace gmp {
 
 class GMPLoaderImpl : public GMPLoader {
 public:
   explicit GMPLoaderImpl(SandboxStarter* aStarter)
     : mSandboxStarter(aStarter)
     , mAdapter(nullptr)
   {}
-  virtual ~GMPLoaderImpl() = default;
+  ~GMPLoaderImpl() override = default;
 
   bool Load(const char* aUTF8LibPath,
             uint32_t aUTF8LibPathLen,
             char* aOriginSalt,
             uint32_t aOriginSaltLen,
             const GMPPlatformAPI* aPlatformAPI,
             GMPAdapter* aAdapter) override;
 
@@ -53,17 +53,17 @@ private:
 };
 
 UniquePtr<GMPLoader> CreateGMPLoader(SandboxStarter* aStarter) {
   return MakeUnique<GMPLoaderImpl>(aStarter);
 }
 
 class PassThroughGMPAdapter : public GMPAdapter {
 public:
-  ~PassThroughGMPAdapter() {
+  ~PassThroughGMPAdapter() override {
     // Ensure we're always shutdown, even if caller forgets to call GMPShutdown().
     GMPShutdown();
   }
 
   void SetAdaptee(PRLibrary* aLib) override
   {
     mLib = aLib;
   }
--- a/dom/media/gmp/widevine-adapter/WidevineDecryptor.cpp
+++ b/dom/media/gmp/widevine-adapter/WidevineDecryptor.cpp
@@ -148,17 +148,17 @@ class WidevineDecryptedBlock : public cd
 public:
 
   WidevineDecryptedBlock()
     : mBuffer(nullptr)
     , mTimestamp(0)
   {
   }
 
-  ~WidevineDecryptedBlock() {
+  ~WidevineDecryptedBlock() override {
     if (mBuffer) {
       mBuffer->Destroy();
       mBuffer = nullptr;
     }
   }
 
   void SetDecryptedBuffer(cdm::Buffer* aBuffer) override {
     mBuffer = aBuffer;
@@ -216,17 +216,17 @@ WidevineDecryptor::DecryptingComplete()
 }
 
 class WidevineBuffer : public cdm::Buffer {
 public:
   explicit WidevineBuffer(size_t aSize) {
     Log("WidevineBuffer(size=" PRIuSIZE ") created", aSize);
     mBuffer.SetLength(aSize);
   }
-  ~WidevineBuffer() {
+  ~WidevineBuffer() override {
     Log("WidevineBuffer(size=" PRIuSIZE ") destroyed", Size());
   }
   void Destroy() override { delete this; }
   uint32_t Capacity() const override { return mBuffer.Length(); };
   uint8_t* Data() override { return mBuffer.Elements(); }
   void SetSize(uint32_t aSize) override { mBuffer.SetLength(aSize); }
   uint32_t Size() const override { return mBuffer.Length(); }
 
--- a/dom/media/webspeech/synth/cocoa/OSXSpeechSynthesizerService.mm
+++ b/dom/media/webspeech/synth/cocoa/OSXSpeechSynthesizerService.mm
@@ -226,17 +226,17 @@ public:
     : mSpeechService(aSpeechService)
     , mVoices(aList)
   {
   }
 
   NS_IMETHOD Run() override;
 
 private:
-  ~RegisterVoicesRunnable() = default;
+  ~RegisterVoicesRunnable() override = default;
 
   // This runnable always use sync mode.  It is unnecesarry to reference object
   OSXSpeechSynthesizerService* mSpeechService;
   nsTArray<OSXVoice>& mVoices;
 };
 
 NS_IMETHODIMP
 RegisterVoicesRunnable::Run()
@@ -270,17 +270,17 @@ public:
   explicit EnumVoicesRunnable(OSXSpeechSynthesizerService* aSpeechService)
     : mSpeechService(aSpeechService)
   {
   }
 
   NS_IMETHOD Run() override;
 
 private:
-  ~EnumVoicesRunnable() = default;
+  ~EnumVoicesRunnable() override = default;
 
   RefPtr<OSXSpeechSynthesizerService> mSpeechService;
 };
 
 NS_IMETHODIMP
 EnumVoicesRunnable::Run()
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
--- a/dom/plugins/base/nsNPAPIPlugin.cpp
+++ b/dom/plugins/base/nsNPAPIPlugin.cpp
@@ -461,19 +461,19 @@ namespace {
 static char *gNPPException;
 
 class nsPluginThreadRunnable : public Runnable,
                                public PRCList
 {
 public:
   nsPluginThreadRunnable(NPP instance, PluginThreadCallback func,
                          void *userData);
-  virtual ~nsPluginThreadRunnable();
-
-  NS_IMETHOD Run();
+  ~nsPluginThreadRunnable() override;
+
+  NS_IMETHOD Run() override;
 
   bool IsForInstance(NPP instance)
   {
     return (mInstance == instance);
   }
 
   void Invalidate()
   {
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -4106,17 +4106,17 @@ class nsPluginDestroyRunnable : public R
 public:
   explicit nsPluginDestroyRunnable(nsNPAPIPluginInstance *aInstance)
     : mInstance(aInstance)
   {
     PR_INIT_CLIST(this);
     PR_APPEND_LINK(this, &sRunnableListHead);
   }
 
-  virtual ~nsPluginDestroyRunnable()
+  ~nsPluginDestroyRunnable() override
   {
     PR_REMOVE_LINK(this);
   }
 
   NS_IMETHOD Run() override
   {
     RefPtr<nsNPAPIPluginInstance> instance;