Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj
authorKyle Huey <khuey@kylehuey.com>
Mon, 25 Apr 2016 17:23:21 -0700
changeset 294847 fcc0936b576daa150697671849a191009ca33811
parent 294846 04c75201afd55809655aec766b6b7d7856cfddf9
child 294848 e1eae7c1a57098c271b67fb0f2a011c7f978a2d8
push id30213
push usercbook@mozilla.com
push dateTue, 26 Apr 2016 11:45:11 +0000
treeherdermozilla-central@9ce31e9f90cb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1265927
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj
accessible/generic/Accessible.cpp
docshell/base/nsDocShell.cpp
docshell/base/nsDocShell.h
docshell/shistory/nsSHEntryShared.cpp
dom/archivereader/ArchiveEvent.h
dom/archivereader/ArchiveRequest.cpp
dom/asmjscache/AsmJSCache.cpp
dom/audiochannel/AudioChannelService.cpp
dom/base/Console.cpp
dom/base/DOMRequest.cpp
dom/base/Element.h
dom/base/File.cpp
dom/base/FragmentOrElement.cpp
dom/base/ImageEncoder.cpp
dom/base/ImportManager.cpp
dom/base/PostMessageEvent.h
dom/base/WebSocket.cpp
dom/base/nsContentUtils.cpp
dom/base/nsDOMMutationObserver.cpp
dom/base/nsDocElementCreatedNotificationRunner.h
dom/base/nsDocument.cpp
dom/base/nsFocusManager.cpp
dom/base/nsFrameLoader.cpp
dom/base/nsFrameMessageManager.cpp
dom/base/nsFrameMessageManager.h
dom/base/nsGlobalWindow.cpp
dom/base/nsIGlobalObject.cpp
dom/base/nsInProcessTabChildGlobal.cpp
dom/base/nsJSEnvironment.cpp
dom/base/nsJSEnvironment.h
dom/base/nsObjectLoadingContent.cpp
dom/base/nsReferencedElement.cpp
dom/base/nsReferencedElement.h
dom/base/nsScriptLoader.cpp
dom/base/nsXMLHttpRequest.cpp
dom/browser-element/BrowserElementAudioChannel.cpp
dom/cache/PrincipalVerifier.h
dom/camera/CameraControlImpl.cpp
dom/camera/DOMCameraCapabilities.cpp
dom/camera/DOMCameraControlListener.cpp
dom/camera/GonkCameraControl.cpp
dom/canvas/ImageBitmap.cpp
dom/canvas/WebGLQuery.h
dom/devicestorage/DeviceStorageRequestParent.h
dom/devicestorage/nsDeviceStorage.cpp
dom/devicestorage/nsDeviceStorage.h
dom/events/IMEContentObserver.h
dom/events/IMEStateManager.cpp
dom/events/TextComposition.h
dom/fetch/Fetch.cpp
dom/filehandle/ActorsParent.cpp
dom/filesystem/FileSystemTaskBase.h
dom/geolocation/nsGeolocation.cpp
dom/html/HTMLFormElement.h
dom/html/HTMLImageElement.cpp
dom/html/HTMLMediaElement.cpp
dom/html/HTMLObjectElement.cpp
dom/html/nsGenericHTMLElement.cpp
dom/html/nsHTMLDocument.cpp
dom/html/nsTextEditorState.cpp
dom/indexedDB/ActorsChild.cpp
dom/indexedDB/ActorsParent.cpp
dom/indexedDB/FileInfo.cpp
dom/indexedDB/FileSnapshot.cpp
dom/indexedDB/ScriptErrorHelper.cpp
dom/inputport/FakeInputPortService.cpp
dom/ipc/Blob.cpp
dom/ipc/ContentParent.cpp
dom/ipc/CrashReporterParent.cpp
dom/ipc/FilePickerParent.h
dom/ipc/ProcessHangMonitor.cpp
dom/ipc/TabChild.cpp
dom/ipc/TabParent.cpp
dom/media/FileBlockCache.h
dom/media/GraphDriver.cpp
dom/media/GraphDriver.h
dom/media/Latency.cpp
dom/media/MediaCache.cpp
dom/media/MediaDecoderReader.cpp
dom/media/MediaEventSource.h
dom/media/MediaFormatReader.cpp
dom/media/MediaManager.cpp
dom/media/MediaManager.h
dom/media/MediaRecorder.cpp
dom/media/MediaStreamGraph.cpp
dom/media/TextTrackList.cpp
dom/media/VideoUtils.h
dom/media/android/AndroidMediaPluginHost.cpp
dom/media/android/AndroidMediaResourceServer.cpp
dom/media/android/AndroidMediaResourceServer.h
dom/media/eme/CDMCallbackProxy.cpp
dom/media/eme/CDMProxy.h
dom/media/gmp/GMPContentParent.cpp
dom/media/gmp/GMPParent.cpp
dom/media/gmp/GMPService.cpp
dom/media/gmp/GMPServiceChild.cpp
dom/media/gmp/GMPServiceParent.cpp
dom/media/gmp/GMPServiceParent.h
dom/media/gtest/TestGMPCrossOrigin.cpp
dom/media/gtest/TestMP4Demuxer.cpp
dom/media/gtest/TestMediaFormatReader.cpp
dom/media/gtest/TestMozPromise.cpp
dom/media/imagecapture/CaptureTask.cpp
dom/media/mediasink/DecodedStream.cpp
dom/media/mediasource/AsyncEventRunner.h
dom/media/mediasource/TrackBuffersManager.cpp
dom/media/omx/MediaOmxReader.cpp
dom/media/platforms/agnostic/BlankDecoderModule.cpp
dom/media/platforms/agnostic/gmp/MediaDataDecoderProxy.h
dom/media/platforms/wmf/WMFVideoMFTManager.cpp
dom/media/systemservices/CamerasChild.cpp
dom/media/systemservices/CamerasParent.cpp
dom/media/systemservices/CamerasParent.h
dom/media/systemservices/CamerasUtils.h
dom/media/systemservices/LoadMonitor.cpp
dom/media/systemservices/MediaUtils.h
dom/media/webaudio/AnalyserNode.cpp
dom/media/webaudio/AudioBufferSourceNode.cpp
dom/media/webaudio/AudioContext.cpp
dom/media/webaudio/AudioContext.h
dom/media/webaudio/AudioDestinationNode.cpp
dom/media/webaudio/AudioNode.cpp
dom/media/webaudio/DynamicsCompressorNode.cpp
dom/media/webaudio/MediaBufferDecoder.cpp
dom/media/webaudio/OscillatorNode.cpp
dom/media/webaudio/PlayingRefChangeHandler.h
dom/media/webaudio/ReportDecodeResultTask.h
dom/media/webaudio/ScriptProcessorNode.cpp
dom/media/webaudio/blink/HRTFDatabaseLoader.cpp
dom/media/webrtc/MediaEngineGonkVideoSource.cpp
dom/media/webrtc/MediaEngineTabVideoSource.h
dom/media/webspeech/recognition/PocketSphinxSpeechRecognitionService.cpp
dom/media/webspeech/recognition/SpeechRecognition.h
dom/media/webspeech/synth/cocoa/OSXSpeechSynthesizerService.mm
dom/media/webspeech/synth/pico/nsPicoService.cpp
dom/media/webspeech/synth/test/nsFakeSynthServices.cpp
dom/network/UDPSocket.cpp
dom/notification/DesktopNotification.cpp
dom/notification/Notification.cpp
dom/plugins/base/android/ANPAudio.cpp
dom/plugins/base/nsNPAPIPlugin.cpp
dom/plugins/base/nsNPAPIPluginInstance.cpp
dom/plugins/base/nsPluginHost.cpp
dom/plugins/base/nsPluginInstanceOwner.cpp
dom/plugins/base/nsPluginNativeWindowWin.cpp
dom/plugins/ipc/PluginHangUIParent.cpp
dom/plugins/ipc/PluginMessageUtils.cpp
dom/promise/Promise.cpp
dom/push/PushManager.cpp
dom/push/PushSubscription.cpp
dom/quota/ActorsParent.cpp
dom/quota/QuotaManagerService.cpp
dom/security/nsCSPContext.cpp
dom/security/nsMixedContentBlocker.cpp
dom/smil/nsSMILTimedElement.cpp
dom/storage/DOMStorage.cpp
dom/storage/DOMStorageCache.cpp
dom/storage/DOMStorageIPC.cpp
dom/system/nsDeviceSensors.cpp
dom/u2f/U2F.h
dom/workers/RuntimeService.cpp
dom/workers/ScriptLoader.cpp
dom/workers/ServiceWorkerClient.cpp
dom/workers/ServiceWorkerClients.cpp
dom/workers/ServiceWorkerEvents.cpp
dom/workers/ServiceWorkerEvents.h
dom/workers/ServiceWorkerInfo.cpp
dom/workers/ServiceWorkerManager.cpp
dom/workers/ServiceWorkerManagerParent.cpp
dom/workers/ServiceWorkerManagerService.cpp
dom/workers/ServiceWorkerPrivate.cpp
dom/workers/ServiceWorkerPrivate.h
dom/workers/ServiceWorkerRegistrar.cpp
dom/workers/ServiceWorkerRegistration.cpp
dom/workers/ServiceWorkerWindowClient.cpp
dom/workers/URL.cpp
dom/workers/WorkerDebuggerManager.cpp
dom/workers/WorkerPrivate.cpp
dom/workers/WorkerRunnable.h
dom/workers/WorkerScope.cpp
dom/workers/XMLHttpRequest.cpp
dom/xslt/xslt/txMozillaXSLTProcessor.cpp
dom/xul/nsXULElement.cpp
editor/composer/nsEditorSpellCheck.cpp
editor/libeditor/nsEditor.cpp
extensions/gio/nsGIOProtocolHandler.cpp
extensions/spellcheck/src/mozInlineSpellChecker.cpp
extensions/spellcheck/src/mozPersonalDictionary.cpp
gfx/layers/AsyncCanvasRenderer.cpp
gfx/layers/ImageContainer.h
gfx/layers/LayerScope.cpp
gfx/layers/apz/util/APZCCallbackHelper.cpp
gfx/layers/ipc/ThreadSafeRefcountingWithMainThreadDestruction.h
gfx/src/gfxCrashReporterUtils.cpp
gfx/thebes/gfxFontInfoLoader.cpp
gfx/thebes/gfxPlatform.cpp
image/DecodePool.cpp
image/ProgressTracker.cpp
image/RasterImage.cpp
image/RasterImage.h
image/imgFrame.cpp
image/imgRequest.cpp
image/imgRequestProxy.h
image/test/gtest/TestDecodeToSurface.cpp
ipc/glue/BackgroundImpl.cpp
ipc/glue/BackgroundParentImpl.cpp
js/xpconnect/loader/mozJSSubScriptLoader.cpp
js/xpconnect/src/XPCComponents.cpp
js/xpconnect/src/XPCJSRuntime.cpp
layout/base/nsDocumentViewer.cpp
layout/base/nsLayoutUtils.h
layout/base/nsPresContext.cpp
layout/base/nsPresContext.h
layout/base/nsPresShell.cpp
layout/forms/nsComboboxControlFrame.cpp
layout/forms/nsComboboxControlFrame.h
layout/forms/nsFileControlFrame.h
layout/forms/nsNumberControlFrame.cpp
layout/forms/nsNumberControlFrame.h
layout/forms/nsTextControlFrame.h
layout/generic/Selection.h
layout/generic/nsGfxScrollFrame.h
layout/generic/nsPluginFrame.h
layout/generic/nsSubDocumentFrame.cpp
layout/generic/nsVideoFrame.cpp
layout/printing/nsPagePrintTimer.cpp
layout/printing/nsPagePrintTimer.h
layout/printing/nsPrintEngine.cpp
layout/style/ErrorReporter.cpp
layout/svg/SVGTextFrame.h
layout/tables/nsTableFrame.cpp
layout/xul/nsImageBoxFrame.cpp
layout/xul/nsListBoxBodyFrame.h
layout/xul/nsMenuBarFrame.cpp
layout/xul/nsMenuFrame.cpp
layout/xul/nsMenuPopupFrame.cpp
layout/xul/nsMenuPopupFrame.h
layout/xul/nsProgressMeterFrame.cpp
layout/xul/nsSliderFrame.cpp
layout/xul/nsXULPopupManager.h
layout/xul/tree/nsTreeBodyFrame.cpp
layout/xul/tree/nsTreeBodyFrame.h
media/mtransport/nr_socket_prsock.cpp
media/mtransport/runnable_utils.h
media/mtransport/test/TestSyncRunnable.cpp
media/mtransport/test/runnable_utils_unittest.cpp
media/mtransport/test/sockettransportservice_unittest.cpp
media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h
media/webrtc/signaling/src/media-conduit/WebrtcMediaCodecVP8VideoCodec.cpp
media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
modules/libpref/Preferences.cpp
netwerk/base/BackgroundFileSaver.cpp
netwerk/base/NetStatistics.h
netwerk/base/NetworkActivityMonitor.cpp
netwerk/base/Predictor.cpp
netwerk/base/TLSServerSocket.cpp
netwerk/base/Tickler.cpp
netwerk/base/nsAsyncRedirectVerifyHelper.cpp
netwerk/base/nsAsyncStreamCopier.cpp
netwerk/base/nsBaseChannel.cpp
netwerk/base/nsBaseChannel.h
netwerk/base/nsIOService.cpp
netwerk/base/nsPACMan.cpp
netwerk/base/nsPACMan.h
netwerk/base/nsPreloadedStream.cpp
netwerk/base/nsRequestObserverProxy.h
netwerk/base/nsServerSocket.cpp
netwerk/base/nsSocketTransport2.cpp
netwerk/base/nsTransportUtils.cpp
netwerk/base/nsUDPSocket.cpp
netwerk/cache/nsCacheEntryDescriptor.cpp
netwerk/cache/nsCacheService.cpp
netwerk/cache/nsCacheService.h
netwerk/cache/nsCacheUtils.cpp
netwerk/cache/nsCacheUtils.h
netwerk/cache/nsDeleteDir.cpp
netwerk/cache/nsDiskCacheDevice.cpp
netwerk/cache/nsDiskCacheDeviceSQL.cpp
netwerk/cache2/CacheEntry.h
netwerk/cache2/CacheFile.cpp
netwerk/cache2/CacheFileChunk.cpp
netwerk/cache2/CacheFileIOManager.cpp
netwerk/cache2/CacheIndex.h
netwerk/cache2/CacheStorageService.cpp
netwerk/cache2/CacheStorageService.h
netwerk/cache2/OldWrappers.cpp
netwerk/cache2/OldWrappers.h
netwerk/dns/DNSListenerProxy.h
netwerk/dns/DNSRequestChild.cpp
netwerk/dns/mdns/libmdns/MDNSResponderReply.h
netwerk/dns/nsDNSService2.cpp
netwerk/ipc/RemoteOpenFileChild.cpp
netwerk/protocol/app/AppProtocolHandler.cpp
netwerk/protocol/file/nsFileChannel.cpp
netwerk/protocol/ftp/FTPChannelParent.cpp
netwerk/protocol/ftp/nsFTPChannel.cpp
netwerk/protocol/ftp/nsFtpConnectionThread.cpp
netwerk/protocol/http/AlternateServices.cpp
netwerk/protocol/http/Http2Push.cpp
netwerk/protocol/http/Http2Session.cpp
netwerk/protocol/http/HttpBaseChannel.cpp
netwerk/protocol/http/HttpChannelChild.cpp
netwerk/protocol/http/HttpChannelParent.cpp
netwerk/protocol/http/HttpChannelParentListener.cpp
netwerk/protocol/http/nsHttpActivityDistributor.cpp
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/protocol/http/nsHttpConnection.cpp
netwerk/protocol/http/nsHttpConnectionMgr.cpp
netwerk/protocol/http/nsHttpTransaction.cpp
netwerk/protocol/http/nsHttpTransaction.h
netwerk/protocol/websocket/WebSocketChannel.cpp
netwerk/protocol/websocket/WebSocketChannelChild.cpp
netwerk/protocol/websocket/WebSocketEventService.cpp
netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
netwerk/sctp/datachannel/DataChannel.cpp
netwerk/sctp/datachannel/DataChannel.h
netwerk/system/linux/nsNotifyAddrListener_Linux.cpp
netwerk/system/linux/nsNotifyAddrListener_Linux.h
netwerk/system/win32/nsNotifyAddrListener.h
parser/html/nsHtml5RefPtr.h
parser/html/nsHtml5SVGLoadDispatcher.h
parser/html/nsHtml5StreamParser.cpp
parser/html/nsHtml5TreeOpExecutor.cpp
parser/htmlparser/nsParser.cpp
security/manager/ssl/CryptoTask.h
security/manager/ssl/DataStorage.cpp
security/manager/ssl/PSMRunnable.h
security/manager/ssl/SSLServerCertVerification.cpp
security/manager/ssl/nsCertVerificationThread.cpp
security/manager/ssl/nsNSSCallbacks.cpp
security/manager/ssl/nsNSSIOLayer.cpp
security/manager/ssl/nsPSMBackgroundThread.cpp
storage/StorageBaseStatementInternal.cpp
storage/mozStorageAsyncStatementExecution.cpp
storage/mozStorageConnection.cpp
storage/mozStorageConnection.h
storage/mozStoragePrivateHelpers.cpp
storage/mozStorageService.cpp
storage/test/storage_test_harness.h
storage/test/test_service_init_background_thread.cpp
storage/test/test_unlock_notify.cpp
toolkit/components/downloads/nsDownloadManager.cpp
toolkit/components/downloads/nsDownloadScanner.cpp
toolkit/components/downloads/nsDownloadScanner.h
toolkit/components/filewatcher/NativeFileWatcherWin.cpp
toolkit/components/finalizationwitness/FinalizationWitnessService.cpp
toolkit/components/osfile/NativeOSFileInternals.cpp
toolkit/components/places/AsyncFaviconHelpers.cpp
toolkit/components/places/AsyncFaviconHelpers.h
toolkit/components/places/Helpers.cpp
toolkit/components/places/Helpers.h
toolkit/components/places/History.cpp
toolkit/components/places/nsNavHistory.cpp
toolkit/components/places/tests/cpp/places_test_harness_tail.h
toolkit/components/satchel/nsFormFillController.cpp
toolkit/components/startup/nsAppStartup.cpp
toolkit/components/telemetry/Telemetry.cpp
toolkit/components/url-classifier/nsUrlClassifierProxies.h
toolkit/crashreporter/InjectCrashReporter.h
toolkit/crashreporter/nsExceptionHandler.cpp
toolkit/identity/IdentityCryptoService.cpp
toolkit/xre/ProfileReset.h
toolkit/xre/nsEmbedFunctions.cpp
tools/profiler/core/platform-linux.cc
tools/profiler/gecko/SaveProfileTask.h
tools/profiler/gecko/ThreadResponsiveness.cpp
view/nsView.cpp
widget/PuppetWidget.h
widget/android/AndroidBridge.cpp
widget/android/AndroidJNI.cpp
widget/android/AndroidJNIWrapper.cpp
widget/android/nsAppShell.cpp
widget/nsBaseAppShell.cpp
widget/nsBaseFilePicker.cpp
widget/tests/TestAppShellSteadyState.cpp
widget/windows/LSPAnnotator.cpp
widget/windows/WidgetTraceEvent.cpp
widget/windows/nsColorPicker.h
widget/windows/nsSound.cpp
xpcom/base/CycleCollectedJSRuntime.cpp
xpcom/base/nsConsoleService.cpp
xpcom/base/nsMemoryInfoDumper.cpp
xpcom/base/nsMemoryReporterManager.cpp
xpcom/base/nsStatusReporterManager.cpp
xpcom/components/nsCategoryManager.cpp
xpcom/components/nsNativeModuleLoader.cpp
xpcom/glue/nsProxyRelease.h
xpcom/glue/nsThreadUtils.cpp
xpcom/glue/nsThreadUtils.h
xpcom/io/nsAnonymousTemporaryFile.cpp
xpcom/io/nsInputStreamTee.cpp
xpcom/io/nsLocalFileWin.cpp
xpcom/tests/TestRacingServiceManager.cpp
xpcom/tests/TestThreadPoolListener.cpp
xpcom/tests/TestThreadUtils.cpp
xpcom/tests/TestTimers.cpp
xpcom/tests/gtest/TestThreadPool.cpp
xpcom/threads/LazyIdleThread.cpp
xpcom/threads/MozPromise.h
xpcom/threads/SyncRunnable.h
xpcom/threads/TaskDispatcher.h
xpcom/threads/TaskQueue.h
xpcom/threads/TimerThread.cpp
xpcom/threads/nsMemoryPressure.cpp
xpcom/threads/nsThread.cpp
xpcom/threads/nsThreadSyncDispatch.h
xpfe/appshell/nsAppShellService.cpp
xpfe/appshell/nsContentTreeOwner.cpp
--- a/accessible/generic/Accessible.cpp
+++ b/accessible/generic/Accessible.cpp
@@ -1763,17 +1763,17 @@ Accessible::RelationByType(RelationType 
 void
 Accessible::GetNativeInterface(void** aNativeAccessible)
 {
 }
 
 void
 Accessible::DoCommand(nsIContent *aContent, uint32_t aActionIndex)
 {
-  class Runnable final : public nsRunnable
+  class Runnable final : public mozilla::Runnable
   {
   public:
     Runnable(Accessible* aAcc, nsIContent* aContent, uint32_t aIdx) :
       mAcc(aAcc), mContent(aContent), mIdx(aIdx) { }
 
     NS_IMETHOD Run() override
     {
       if (mAcc)
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -9456,17 +9456,17 @@ nsDocShell::CopyFavicon(nsIURI* aOldURI,
       new nsCopyFaviconCallback(favSvc, aNewURI,
                                 aLoadingPrincipal,
                                 aInPrivateBrowsing);
     favSvc->GetFaviconURLForPage(aOldURI, callback);
   }
 #endif
 }
 
-class InternalLoadEvent : public nsRunnable
+class InternalLoadEvent : public Runnable
 {
 public:
   InternalLoadEvent(nsDocShell* aDocShell, nsIURI* aURI,
                     nsIURI* aOriginalURI, bool aLoadReplace,
                     nsIURI* aReferrer, uint32_t aReferrerPolicy,
                     nsISupports* aOwner, uint32_t aFlags,
                     const char* aTypeHint, nsIInputStream* aPostData,
                     nsIInputStream* aHeadersData, uint32_t aLoadType,
@@ -13519,17 +13519,17 @@ nsDocShell::SelectAll(void)
 NS_IMETHODIMP
 nsDocShell::SelectNone(void)
 {
   return DoCommand("cmd_selectNone");
 }
 
 // link handling
 
-class OnLinkClickEvent : public nsRunnable
+class OnLinkClickEvent : public Runnable
 {
 public:
   OnLinkClickEvent(nsDocShell* aHandler, nsIContent* aContent,
                    nsIURI* aURI,
                    const char16_t* aTargetSpec,
                    const nsAString& aFileName,
                    nsIInputStream* aPostDataStream,
                    nsIInputStream* aHeadersDataStream,
--- a/docshell/base/nsDocShell.h
+++ b/docshell/base/nsDocShell.h
@@ -754,17 +754,17 @@ protected:
   {
     bool didDisplayLoadError = false;
     DisplayLoadError(aError, aURI, aURL, aFailedChannel, &didDisplayLoadError);
     return didDisplayLoadError;
   }
 
 public:
   // Event type dispatched by RestorePresentation
-  class RestorePresentationEvent : public nsRunnable
+  class RestorePresentationEvent : public mozilla::Runnable
   {
   public:
     NS_DECL_NSIRUNNABLE
     explicit RestorePresentationEvent(nsDocShell* aDs) : mDocShell(aDs) {}
     void Revoke() { mDocShell = nullptr; }
   private:
     RefPtr<nsDocShell> mDocShell;
   };
--- a/docshell/shistory/nsSHEntryShared.cpp
+++ b/docshell/shistory/nsSHEntryShared.cpp
@@ -243,17 +243,17 @@ nsSHEntryShared::RemoveFromBFCacheSync()
 
   if (viewer) {
     viewer->Destroy();
   }
 
   return NS_OK;
 }
 
-class DestroyViewerEvent : public nsRunnable
+class DestroyViewerEvent : public mozilla::Runnable
 {
 public:
   DestroyViewerEvent(nsIContentViewer* aViewer, nsIDocument* aDocument)
     : mViewer(aViewer)
     , mDocument(aDocument)
   {
   }
 
--- a/dom/archivereader/ArchiveEvent.h
+++ b/dom/archivereader/ArchiveEvent.h
@@ -44,17 +44,17 @@ protected:
   nsCString mType;
 };
 
 /**
  * This class must be extended by any archive format supported by ArchiveReader API
  * This class runs in a different thread and it calls the 'exec()' method.
  * The exec() must populate mFileList and mStatus then it must call RunShare();
  */
-class ArchiveReaderEvent : public nsRunnable
+class ArchiveReaderEvent : public Runnable
 {
 public:
   NS_DECL_NSIRUNNABLE
 
   explicit ArchiveReaderEvent(ArchiveReader* aArchiveReader);
 
 protected:
   virtual ~ArchiveReaderEvent();
--- a/dom/archivereader/ArchiveRequest.cpp
+++ b/dom/archivereader/ArchiveRequest.cpp
@@ -13,17 +13,17 @@
 
 using namespace mozilla;
 
 USING_ARCHIVEREADER_NAMESPACE
 
 /**
  * Class used to make asynchronous the ArchiveRequest.
  */
-class ArchiveRequestEvent : public nsRunnable
+class ArchiveRequestEvent : public Runnable
 {
 public:
   NS_DECL_NSIRUNNABLE
 
   explicit ArchiveRequestEvent(ArchiveRequest* aRequest)
   : mRequest(aRequest)
   {
     MOZ_COUNT_CTOR(ArchiveRequestEvent);
--- a/dom/asmjscache/AsmJSCache.cpp
+++ b/dom/asmjscache/AsmJSCache.cpp
@@ -233,17 +233,17 @@ EvictEntries(nsIFile* aDirectory, const 
 
     entry.clear();
   }
 }
 
 // FileDescriptorHolder owns a file descriptor and its memory mapping.
 // FileDescriptorHolder is derived by two runnable classes (that is,
 // (Parent|Child)Runnable.
-class FileDescriptorHolder : public nsRunnable
+class FileDescriptorHolder : public Runnable
 {
 public:
   FileDescriptorHolder()
   : mQuotaObject(nullptr),
     mFileSize(INT64_MIN),
     mFileDesc(nullptr),
     mFileMap(nullptr),
     mMappedMemory(nullptr)
--- a/dom/audiochannel/AudioChannelService.cpp
+++ b/dom/audiochannel/AudioChannelService.cpp
@@ -38,17 +38,17 @@ using namespace mozilla::dom;
 using namespace mozilla::hal;
 
 namespace {
 
 // If true, any new AudioChannelAgent will be muted when created.
 bool sAudioChannelMutedByDefault = false;
 bool sXPCOMShuttingDown = false;
 
-class NotifyChannelActiveRunnable final : public nsRunnable
+class NotifyChannelActiveRunnable final : public Runnable
 {
 public:
   NotifyChannelActiveRunnable(uint64_t aWindowID, AudioChannel aAudioChannel,
                               bool aActive)
     : mWindowID(aWindowID)
     , mAudioChannel(aAudioChannel)
     , mActive(aActive)
   {}
@@ -93,28 +93,28 @@ private:
   const AudioChannel mAudioChannel;
   const bool mActive;
 };
 
 void
 NotifyChannelActive(uint64_t aWindowID, AudioChannel aAudioChannel,
                     bool aActive)
 {
-  RefPtr<nsRunnable> runnable =
+  RefPtr<Runnable> runnable =
     new NotifyChannelActiveRunnable(aWindowID, aAudioChannel, aActive);
   NS_DispatchToCurrentThread(runnable);
 }
 
 bool
 IsParentProcess()
 {
   return XRE_GetProcessType() == GeckoProcessType_Default;
 }
 
-class MediaPlaybackRunnable : public nsRunnable
+class MediaPlaybackRunnable : public Runnable
 {
 public:
   MediaPlaybackRunnable(nsPIDOMWindowOuter* aWindow, bool aActive)
     : mWindow(aWindow)
     , mActive(aActive)
   {}
 
  NS_IMETHOD Run()
--- a/dom/base/Console.cpp
+++ b/dom/base/Console.cpp
@@ -307,17 +307,17 @@ public:
   {
     JS_ClearPendingException(mCx);
   }
 
 private:
   JSContext* mCx;
 };
 
-class ConsoleRunnable : public nsRunnable
+class ConsoleRunnable : public Runnable
                       , public WorkerFeature
                       , public StructuredCloneHolderBase
 {
 public:
   explicit ConsoleRunnable(Console* aConsole)
     : mWorkerPrivate(GetCurrentThreadWorkerPrivate())
     , mConsole(aConsole)
   {
--- a/dom/base/DOMRequest.cpp
+++ b/dom/base/DOMRequest.cpp
@@ -290,17 +290,17 @@ DOMRequestService::FireDetailedError(nsI
   NS_ENSURE_STATE(aRequest);
   nsCOMPtr<DOMError> err = do_QueryInterface(aError);
   NS_ENSURE_STATE(err);
   static_cast<DOMRequest*>(aRequest)->FireDetailedError(err);
 
   return NS_OK;
 }
 
-class FireSuccessAsyncTask : public nsRunnable
+class FireSuccessAsyncTask : public mozilla::Runnable
 {
 
   FireSuccessAsyncTask(DOMRequest* aRequest,
                        const JS::Value& aResult) :
     mReq(aRequest),
     mResult(nsContentUtils::RootingCxForThread(), aResult)
   {
   }
@@ -327,17 +327,17 @@ public:
     return NS_OK;
   }
 
 private:
   RefPtr<DOMRequest> mReq;
   JS::PersistentRooted<JS::Value> mResult;
 };
 
-class FireErrorAsyncTask : public nsRunnable
+class FireErrorAsyncTask : public mozilla::Runnable
 {
 public:
   FireErrorAsyncTask(DOMRequest* aRequest,
                      const nsAString& aError) :
     mReq(aRequest),
     mError(aError)
   {
   }
--- a/dom/base/Element.h
+++ b/dom/base/Element.h
@@ -1346,17 +1346,17 @@ private:
 
   nsIScrollableFrame* GetScrollFrame(nsIFrame **aStyledFrame = nullptr,
                                      bool aFlushLayout = true);
 
   // Data members
   EventStates mState;
 };
 
-class RemoveFromBindingManagerRunnable : public nsRunnable
+class RemoveFromBindingManagerRunnable : public mozilla::Runnable
 {
 public:
   RemoveFromBindingManagerRunnable(nsBindingManager* aManager,
                                    nsIContent* aContent,
                                    nsIDocument* aDoc);
 
   NS_IMETHOD Run() override;
 private:
--- a/dom/base/File.cpp
+++ b/dom/base/File.cpp
@@ -861,17 +861,17 @@ BlobImplFile::GetSize(ErrorResult& aRv)
     mLength = fileSize;
   }
 
   return mLength;
 }
 
 namespace {
 
-class GetTypeRunnable final : public nsRunnable
+class GetTypeRunnable final : public Runnable
 {
 public:
   GetTypeRunnable(WorkerPrivate* aWorkerPrivate,
                   nsIEventTarget* aSyncLoopTarget,
                   BlobImpl* aBlobImpl)
     : mWorkerPrivate(aWorkerPrivate)
     , mSyncLoopTarget(aSyncLoopTarget)
     , mBlobImpl(aBlobImpl)
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -1232,17 +1232,17 @@ FragmentOrElement::FireNodeInserted(nsID
 }
 
 //----------------------------------------------------------------------
 
 // nsISupports implementation
 
 #define SUBTREE_UNBINDINGS_PER_RUNNABLE 500
 
-class ContentUnbinder : public nsRunnable
+class ContentUnbinder : public Runnable
 {
 public:
   ContentUnbinder()
   {
     mLast = this;
   }
 
   ~ContentUnbinder()
--- a/dom/base/ImageEncoder.cpp
+++ b/dom/base/ImageEncoder.cpp
@@ -21,17 +21,17 @@
 using namespace mozilla::gfx;
 
 namespace mozilla {
 namespace dom {
 
 // This class should be placed inside GetBRGADataSourceSurfaceSync(). However,
 // due to B2G ICS uses old complier (C++98/03) which forbids local class as
 // template parameter, we need to move this class outside.
-class SurfaceHelper : public nsRunnable {
+class SurfaceHelper : public Runnable {
 public:
   explicit SurfaceHelper(already_AddRefed<layers::Image> aImage) : mImage(aImage) {}
 
   // It retrieves a SourceSurface reference and convert color format on main
   // thread and passes DataSourceSurface to caller thread.
   NS_IMETHOD Run() {
     // It guarantees the reference will be released on main thread.
     nsCountedRef<nsMainThreadSourceSurfaceRef> surface;
@@ -130,17 +130,17 @@ private:
   uint64_t mImgSize;
   nsAutoString mType;
   void* mImgData;
   nsCOMPtr<nsIThread> mCreationThread;
   RefPtr<EncodeCompleteCallback> mEncodeCompleteCallback;
   bool mFailed;
 };
 
-class EncodingRunnable : public nsRunnable
+class EncodingRunnable : public Runnable
 {
   virtual ~EncodingRunnable() {}
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   EncodingRunnable(const nsAString& aType,
                    const nsAString& aOptions,
@@ -231,17 +231,17 @@ private:
   RefPtr<layers::Image> mImage;
   nsCOMPtr<imgIEncoder> mEncoder;
   RefPtr<EncodingCompleteEvent> mEncodingCompleteEvent;
   int32_t mFormat;
   const nsIntSize mSize;
   bool mUsingCustomOptions;
 };
 
-NS_IMPL_ISUPPORTS_INHERITED0(EncodingRunnable, nsRunnable);
+NS_IMPL_ISUPPORTS_INHERITED0(EncodingRunnable, Runnable);
 
 StaticRefPtr<nsIThreadPool> ImageEncoder::sThreadPool;
 
 /* static */
 nsresult
 ImageEncoder::ExtractData(nsAString& aType,
                           const nsAString& aOptions,
                           const nsIntSize aSize,
--- a/dom/base/ImportManager.cpp
+++ b/dom/base/ImportManager.cpp
@@ -373,17 +373,17 @@ ImportLoader::RemoveLinkElement(nsINode*
 {
   mLinks.RemoveElement(aNode);
 }
 
 // Events has to be fired with a script runner, so mImport can
 // be set on the link element before the load event is fired even
 // if ImportLoader::Get returns an already loaded import and we
 // fire the load event immediately on the new referring link element.
-class AsyncEvent : public nsRunnable {
+class AsyncEvent : public Runnable {
 public:
   AsyncEvent(nsINode* aNode, bool aSuccess)
     : mNode(aNode)
     , mSuccess(aSuccess)
   {
     MOZ_ASSERT(mNode);
   }
 
--- a/dom/base/PostMessageEvent.h
+++ b/dom/base/PostMessageEvent.h
@@ -19,17 +19,17 @@ class nsIPrincipal;
 
 namespace mozilla {
 namespace dom {
 
 /**
  * Class used to represent events generated by calls to Window.postMessage,
  * which asynchronously creates and dispatches events.
  */
-class PostMessageEvent final : public nsRunnable
+class PostMessageEvent final : public Runnable
                              , public StructuredCloneHolder
 {
 public:
   NS_DECL_NSIRUNNABLE
 
   PostMessageEvent(nsGlobalWindow* aSource,
                    const nsAString& aCallerOrigin,
                    nsGlobalWindow* aTargetWindow,
--- a/dom/base/WebSocket.cpp
+++ b/dom/base/WebSocket.cpp
@@ -384,17 +384,17 @@ WebSocketImpl::PrintErrorOnConsole(const
 
   // print the error message directly to the JS console
   rv = console->LogMessage(errorObject);
   NS_ENSURE_SUCCESS_VOID(rv);
 }
 
 namespace {
 
-class CancelWebSocketRunnable final : public nsRunnable
+class CancelWebSocketRunnable final : public Runnable
 {
 public:
   CancelWebSocketRunnable(nsIWebSocketChannel* aChannel, uint16_t aReasonCode,
                           const nsACString& aReasonString)
     : mChannel(aChannel)
     , mReasonCode(aReasonCode)
     , mReasonString(aReasonString)
   {}
@@ -432,17 +432,17 @@ public:
       mImpl->Disconnect();
     }
   }
 
 private:
   WebSocketImpl* mImpl;
 };
 
-class CloseConnectionRunnable final : public nsRunnable
+class CloseConnectionRunnable final : public Runnable
 {
 public:
   CloseConnectionRunnable(WebSocketImpl* aImpl,
                           uint16_t aReasonCode,
                           const nsACString& aReasonString)
     : mImpl(aImpl)
     , mReasonCode(aReasonCode)
     , mReasonString(aReasonString)
@@ -461,19 +461,19 @@ private:
 
 } // namespace
 
 nsresult
 WebSocketImpl::CloseConnection(uint16_t aReasonCode,
                                const nsACString& aReasonString)
 {
   if (!IsTargetThread()) {
-    RefPtr<nsRunnable> runnable =
+    nsCOMPtr<nsIRunnable> runnable =
       new CloseConnectionRunnable(this, aReasonCode, aReasonString);
-    return Dispatch(runnable, NS_DISPATCH_NORMAL);
+    return Dispatch(runnable.forget(), NS_DISPATCH_NORMAL);
   }
 
   AssertIsOnTargetThread();
 
   if (mDisconnectingOrDisconnected) {
     return NS_OK;
   }
 
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -4728,17 +4728,17 @@ nsContentUtils::IsInSameAnonymousTree(co
   if (aNode->IsInShadowTree()) {
     return nodeAsContent->GetContainingShadow() ==
       aContent->GetContainingShadow();
   }
 
   return nodeAsContent->GetBindingParent() == aContent->GetBindingParent();
 }
 
-class AnonymousContentDestroyer : public nsRunnable {
+class AnonymousContentDestroyer : public Runnable {
 public:
   explicit AnonymousContentDestroyer(nsCOMPtr<nsIContent>* aContent) {
     mContent.swap(*aContent);
     mParent = mContent->GetParent();
     mDoc = mContent->OwnerDoc();
   }
   explicit AnonymousContentDestroyer(nsCOMPtr<Element>* aElement) {
     mContent = aElement->forget();
--- a/dom/base/nsDOMMutationObserver.cpp
+++ b/dom/base/nsDOMMutationObserver.cpp
@@ -850,17 +850,17 @@ nsDOMMutationObserver::HandleMutation()
       current.swap(next);
     }
   }
   ClearPendingRecords();
 
   mCallback->Call(this, mutations, *this);
 }
 
-class AsyncMutationHandler : public nsRunnable
+class AsyncMutationHandler : public mozilla::Runnable
 {
 public:
   NS_IMETHOD Run()
   {
     nsDOMMutationObserver::HandleMutations();
     return NS_OK;
   }
 };
--- a/dom/base/nsDocElementCreatedNotificationRunner.h
+++ b/dom/base/nsDocElementCreatedNotificationRunner.h
@@ -9,17 +9,17 @@
 
 #include "mozilla/Attributes.h"
 #include "nsThreadUtils.h" /* nsRunnable */
 
 #include "nsContentSink.h"
 #include "nsCOMPtr.h"
 #include "nsIDocument.h"
 
-class nsDocElementCreatedNotificationRunner : public nsRunnable
+class nsDocElementCreatedNotificationRunner : public mozilla::Runnable
 {
 public:
   explicit nsDocElementCreatedNotificationRunner(nsIDocument* aDoc)
     : mDoc(aDoc)
   {
   }
 
   NS_IMETHOD Run() override
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -1355,17 +1355,17 @@ nsIDocument::SelectorCache::SelectorCach
 void nsIDocument::SelectorCache::CacheList(const nsAString& aSelector,
                                            nsCSSSelectorList* aSelectorList)
 {
   SelectorCacheKey* key = new SelectorCacheKey(aSelector);
   mTable.Put(key->mKey, aSelectorList);
   AddObject(key);
 }
 
-class nsIDocument::SelectorCacheKeyDeleter final : public nsRunnable
+class nsIDocument::SelectorCacheKeyDeleter final : public Runnable
 {
 public:
   explicit SelectorCacheKeyDeleter(SelectorCacheKey* aToDelete)
     : mSelector(aToDelete)
   {
     MOZ_COUNT_CTOR(SelectorCacheKeyDeleter);
   }
 
@@ -9142,17 +9142,17 @@ nsDocument::UnblockOnload(bool aFireSync
                                  NS_LITERAL_STRING("MozSVGAsImageDocumentLoad"),
                                  false,
                                  false);
       asyncDispatcher->PostDOMEvent();
     }
   }
 }
 
-class nsUnblockOnloadEvent : public nsRunnable {
+class nsUnblockOnloadEvent : public Runnable {
 public:
   explicit nsUnblockOnloadEvent(nsDocument* aDoc) : mDoc(aDoc) {}
   NS_IMETHOD Run() {
     mDoc->DoUnblockOnload();
     return NS_OK;
   }
 private:
   RefPtr<nsDocument> mDoc;
@@ -10016,17 +10016,17 @@ nsDocument::LoadChromeSheetSync(nsIURI* 
                                 mozilla::StyleSheetHandle::RefPtr* aSheet)
 {
   css::SheetParsingMode mode =
     isAgentSheet ? css::eAgentSheetFeatures
                  : css::eAuthorSheetFeatures;
   return CSSLoader()->LoadSheetSync(uri, mode, isAgentSheet, aSheet);
 }
 
-class nsDelayedEventDispatcher : public nsRunnable
+class nsDelayedEventDispatcher : public Runnable
 {
 public:
   explicit nsDelayedEventDispatcher(nsTArray<nsCOMPtr<nsIDocument>>& aDocuments)
   {
     mDocuments.SwapElements(aDocuments);
   }
   virtual ~nsDelayedEventDispatcher() {}
 
@@ -11205,17 +11205,17 @@ AskWindowToExitFullscreen(nsIDocument* a
       /* DefaultAction */ nullptr);
   } else {
     if (nsPIDOMWindowOuter* win = aDoc->GetWindow()) {
       win->SetFullscreenInternal(FullscreenReason::ForFullscreenAPI, false);
     }
   }
 }
 
-class nsCallExitFullscreen : public nsRunnable
+class nsCallExitFullscreen : public Runnable
 {
 public:
   explicit nsCallExitFullscreen(nsIDocument* aDoc)
     : mDoc(aDoc) {}
 
   NS_IMETHOD Run() override final
   {
     if (!mDoc) {
@@ -11279,17 +11279,17 @@ ResetFullScreen(nsIDocument* aDocument, 
     aDocument->EnumerateSubDocuments(ResetFullScreen, aData);
   }
   return true;
 }
 
 // Since nsIDocument::ExitFullscreenInDocTree() could be called from
 // Element::UnbindFromTree() where it is not safe to synchronously run
 // script. This runnable is the script part of that function.
-class ExitFullscreenScriptRunnable : public nsRunnable
+class ExitFullscreenScriptRunnable : public Runnable
 {
 public:
   explicit ExitFullscreenScriptRunnable(nsCOMArray<nsIDocument>&& aDocuments)
     : mDocuments(Move(aDocuments)) { }
 
   NS_IMETHOD Run() override
   {
     // Dispatch MozDOMFullscreen:Exited to the last document in
@@ -11473,17 +11473,17 @@ nsDocument::RestorePreviousFullScreenSta
     // cross origin, dispatch an event to chrome so it knows to show
     // the warning UI.
     DispatchCustomEventWithFlush(
       newFullscreenDoc, NS_LITERAL_STRING("MozDOMFullscreen:NewOrigin"),
       /* Bubbles */ true, /* ChromeOnly */ true);
   }
 }
 
-class nsCallRequestFullScreen : public nsRunnable
+class nsCallRequestFullScreen : public Runnable
 {
 public:
   explicit nsCallRequestFullScreen(UniquePtr<FullscreenRequest>&& aRequest)
     : mRequest(Move(aRequest)) { }
 
   NS_IMETHOD Run()
   {
     mRequest->GetDocument()->RequestFullScreen(Move(mRequest));
@@ -11720,18 +11720,18 @@ HasFullScreenSubDocument(nsIDocument* aD
 // in the given document. Returns a static string indicates the reason
 // why it is not enabled otherwise.
 static const char*
 GetFullscreenError(nsIDocument* aDoc, bool aCallerIsChrome)
 {
   if (nsContentUtils::IsFullScreenApiEnabled() && aCallerIsChrome) {
     // Chrome code can always use the full-screen API, provided it's not
     // explicitly disabled. Note IsCallerChrome() returns true when running
-    // in an nsRunnable, so don't use GetMozFullScreenEnabled() from an
-    // nsRunnable!
+    // in a Runnable, so don't use GetMozFullScreenEnabled() from a
+    // Runnable!
     return nullptr;
   }
 
   if (!nsContentUtils::IsFullScreenApiEnabled()) {
     return "FullscreenDeniedDisabled";
   }
   if (!aDoc->IsVisible()) {
     return "FullscreenDeniedHidden";
@@ -12246,17 +12246,17 @@ DispatchPointerLockError(nsIDocument* aT
   asyncDispatcher->PostDOMEvent();
 }
 
 static const uint8_t kPointerLockRequestLimit = 2;
 
 class nsPointerLockPermissionRequest;
 mozilla::StaticRefPtr<nsPointerLockPermissionRequest> gPendingPointerLockRequest;
 
-class nsPointerLockPermissionRequest : public nsRunnable,
+class nsPointerLockPermissionRequest : public Runnable,
                                        public nsIContentPermissionRequest
 {
 public:
   nsPointerLockPermissionRequest(Element* aElement, bool aUserInputOrChromeCaller)
   : mElement(do_GetWeakReference(aElement)),
     mDocument(do_GetWeakReference(aElement->OwnerDoc())),
     mUserInputOrChromeCaller(aUserInputOrChromeCaller)
   {
@@ -12321,17 +12321,17 @@ public:
   bool mUserInputOrChromeCaller;
 
 protected:
   virtual ~nsPointerLockPermissionRequest() {}
   nsCOMPtr<nsIContentPermissionRequester> mRequester;
 };
 
 NS_IMPL_ISUPPORTS_INHERITED(nsPointerLockPermissionRequest,
-                            nsRunnable,
+                            Runnable,
                             nsIContentPermissionRequest)
 
 NS_IMETHODIMP
 nsPointerLockPermissionRequest::GetTypes(nsIArray** aTypes)
 {
   nsTArray<nsString> emptyOptions;
   return nsContentPermissionUtils::CreatePermissionArray(NS_LITERAL_CSTRING("pointerLock"),
                                                          NS_LITERAL_CSTRING("unused"),
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -1953,17 +1953,17 @@ nsFocusManager::Focus(nsPIDOMWindowOuter
   if (mFocusedContent == aContent)
     UpdateCaret(aFocusChanged && !(aFlags & FLAG_BYMOUSE), aIsNewDocument,
                 mFocusedContent);
 
   if (clearFirstFocusEvent)
     mFirstFocusEvent = nullptr;
 }
 
-class FocusBlurEvent : public nsRunnable
+class FocusBlurEvent : public Runnable
 {
 public:
   FocusBlurEvent(nsISupports* aTarget, EventMessage aEventMessage,
                  nsPresContext* aContext, bool aWindowRaised,
                  bool aIsRefocus, EventTarget* aRelatedTarget)
     : mTarget(aTarget)
     , mContext(aContext)
     , mEventMessage(aEventMessage)
@@ -3448,17 +3448,17 @@ nsFocusManager::GetFocusInSelection(nsPI
       if (selectionNode)
         break;
       selectionNode = testNode;
     } while (true);
   }
   while (selectionNode && selectionNode != endSelectionNode);
 }
 
-class PointerUnlocker : public nsRunnable
+class PointerUnlocker : public Runnable
 {
 public:
   PointerUnlocker()
   {
     MOZ_ASSERT(!PointerUnlocker::sActiveUnlocker);
     PointerUnlocker::sActiveUnlocker = this;
   }
 
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -1400,17 +1400,17 @@ nsFrameLoader::SwapWithOtherLoader(nsFra
 
 NS_IMETHODIMP
 nsFrameLoader::Destroy()
 {
   StartDestroy();
   return NS_OK;
 }
 
-class nsFrameLoaderDestroyRunnable : public nsRunnable
+class nsFrameLoaderDestroyRunnable : public Runnable
 {
   enum DestroyPhase
   {
     // See the implementation of Run for an explanation of these phases.
     eDestroyDocShell,
     eWaitForUnloadMessage,
     eDestroyComplete
   };
@@ -2576,17 +2576,17 @@ nsFrameLoader::DoLoadMessageManagerScrip
     static_cast<nsInProcessTabChildGlobal*>(GetTabChildGlobalAsEventTarget());
   if (tabChild) {
     tabChild->LoadFrameScript(aURL, aRunInGlobalScope);
   }
   return true;
 }
 
 class nsAsyncMessageToChild : public nsSameProcessAsyncMessageBase,
-                              public nsRunnable
+                              public Runnable
 {
 public:
   nsAsyncMessageToChild(JSContext* aCx, JS::Handle<JSObject*> aCpows, nsFrameLoader* aFrameLoader)
     : nsSameProcessAsyncMessageBase(aCx, aCpows)
     , mFrameLoader(aFrameLoader)
   {
   }
 
--- a/dom/base/nsFrameMessageManager.cpp
+++ b/dom/base/nsFrameMessageManager.cpp
@@ -1885,17 +1885,17 @@ nsMessageManagerScriptExecutor::MarkScop
 
 NS_IMPL_ISUPPORTS(nsScriptCacheCleaner, nsIObserver)
 
 nsFrameMessageManager* nsFrameMessageManager::sChildProcessManager = nullptr;
 nsFrameMessageManager* nsFrameMessageManager::sParentProcessManager = nullptr;
 nsFrameMessageManager* nsFrameMessageManager::sSameProcessParentManager = nullptr;
 
 class nsAsyncMessageToSameProcessChild : public nsSameProcessAsyncMessageBase,
-                                         public nsRunnable
+                                         public Runnable
 {
 public:
   nsAsyncMessageToSameProcessChild(JSContext* aCx, JS::Handle<JSObject*> aCpows)
     : nsSameProcessAsyncMessageBase(aCx, aCpows)
   { }
   NS_IMETHOD Run()
   {
     nsFrameMessageManager* ppm = nsFrameMessageManager::GetChildProcessManager();
--- a/dom/base/nsFrameMessageManager.h
+++ b/dom/base/nsFrameMessageManager.h
@@ -312,17 +312,17 @@ private:
   nsresult AssertProcessInternal(ProcessCheckerType aType,
                                  const nsAString& aCapability,
                                  bool* aValid);
 };
 
 /* A helper class for taking care of many details for async message sending
    within a single process.  Intended to be used like so:
 
-   class MyAsyncMessage : public nsSameProcessAsyncMessageBase, public nsRunnable
+   class MyAsyncMessage : public nsSameProcessAsyncMessageBase, public Runnable
    {
      NS_IMETHOD Run() {
        ReceiveMessage(..., ...);
        return NS_OK;
      }
    };
 
 
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -5907,17 +5907,17 @@ GetFullscreenTransitionDuration(bool aEn
     "full-screen-api.transition-duration.leave";
   nsAdoptingCString prefValue = Preferences::GetCString(pref);
   if (!prefValue.IsEmpty()) {
     sscanf(prefValue.get(), "%hu%hu",
            &aDuration->mFadeIn, &aDuration->mFadeOut);
   }
 }
 
-class FullscreenTransitionTask : public nsRunnable
+class FullscreenTransitionTask : public Runnable
 {
 public:
   FullscreenTransitionTask(const FullscreenTransitionDuration& aDuration,
                            nsGlobalWindow* aWindow, bool aFullscreen,
                            nsIWidget* aWidget, nsIScreen* aScreen,
                            nsISupports* aTransitionData)
     : mWindow(aWindow)
     , mWidget(aWidget)
@@ -8143,17 +8143,17 @@ nsGlobalWindow::PostMessageMoz(JSContext
       aError.Throw(NS_ERROR_OUT_OF_MEMORY);
       return;
     }
   }
 
   PostMessageMoz(aCx, aMessage, aTargetOrigin, transferArray, aError);
 }
 
-class nsCloseEvent : public nsRunnable {
+class nsCloseEvent : public Runnable {
 
   RefPtr<nsGlobalWindow> mWindow;
   bool mIndirect;
 
   nsCloseEvent(nsGlobalWindow *aWindow, bool aIndirect)
     : mWindow(aWindow)
     , mIndirect(aIndirect)
   {}
@@ -8524,17 +8524,17 @@ nsGlobalWindow::RunPendingTimeoutsRecurs
     }
 
     auto* childWin = nsGlobalWindow::Cast(child);
 
     RunPendingTimeoutsRecursive(aTopWindow, childWin);
   }
 }
 
-class nsPendingTimeoutRunner : public nsRunnable
+class nsPendingTimeoutRunner : public Runnable
 {
 public:
   explicit nsPendingTimeoutRunner(nsGlobalWindow* aWindow)
     : mWindow(aWindow)
   {
     NS_ASSERTION(mWindow, "mWindow is null.");
   }
 
@@ -8624,17 +8624,17 @@ struct BrowserCompartmentMatcher : publi
   virtual bool match(JSCompartment* c) const override
   {
     nsCOMPtr<nsIPrincipal> pc = nsJSPrincipals::get(JS_GetCompartmentPrincipals(c));
     return nsContentUtils::IsSystemOrExpandedPrincipal(pc);
   }
 };
 
 
-class WindowDestroyedEvent : public nsRunnable
+class WindowDestroyedEvent : public Runnable
 {
 public:
   WindowDestroyedEvent(nsIDOMWindow* aWindow, uint64_t aID,
                        const char* aTopic) :
     mID(aID), mTopic(aTopic)
   {
     mWindow = do_GetWeakReference(aWindow);
   }
@@ -9055,17 +9055,17 @@ nsGlobalWindow::ShowModalDialog(JSContex
     aError = nsContentUtils::XPConnect()->VariantToJS(aCx,
                                                       FastGetGlobalJSObject(),
                                                       retVal, aRetval);
   } else {
     aRetval.setNull();
   }
 }
 
-class ChildCommandDispatcher : public nsRunnable
+class ChildCommandDispatcher : public Runnable
 {
 public:
   ChildCommandDispatcher(nsGlobalWindow* aWindow,
                          nsITabChild* aTabChild,
                          const nsAString& aAction)
   : mWindow(aWindow), mTabChild(aTabChild), mAction(aAction) {}
 
   NS_IMETHOD Run()
@@ -9085,17 +9085,17 @@ public:
   }
 
 private:
   RefPtr<nsGlobalWindow>             mWindow;
   nsCOMPtr<nsITabChild>                mTabChild;
   nsString                             mAction;
 };
 
-class CommandDispatcher : public nsRunnable
+class CommandDispatcher : public Runnable
 {
 public:
   CommandDispatcher(nsIDOMXULCommandDispatcher* aDispatcher,
                     const nsAString& aAction)
   : mDispatcher(aDispatcher), mAction(aAction) {}
 
   NS_IMETHOD Run()
   {
@@ -9885,17 +9885,17 @@ nsGlobalWindow::PageHidden()
   nsIFocusManager* fm = nsFocusManager::GetFocusManager();
   if (fm) {
     fm->WindowHidden(GetOuterWindow());
   }
 
   mNeedsFocus = true;
 }
 
-class HashchangeCallback : public nsRunnable
+class HashchangeCallback : public Runnable
 {
 public:
   HashchangeCallback(const nsAString &aOldURL,
                      const nsAString &aNewURL,
                      nsGlobalWindow* aWindow)
     : mWindow(aWindow)
   {
     MOZ_ASSERT(mWindow);
@@ -10492,17 +10492,17 @@ nsGlobalWindow::FireOfflineStatusEventIf
     Element* documentElement = mDoc->GetDocumentElement();
     if (documentElement) {
       eventTarget = documentElement;
     }
   }
   nsContentUtils::DispatchTrustedEvent(mDoc, eventTarget, name, true, false);
 }
 
-class NotifyIdleObserverRunnable : public nsRunnable
+class NotifyIdleObserverRunnable : public Runnable
 {
 public:
   NotifyIdleObserverRunnable(nsIIdleObserver* aIdleObserver,
                              uint32_t aTimeInS,
                              bool aCallOnidle,
                              nsGlobalWindow* aIdleWindow)
     : mIdleObserver(aIdleObserver), mTimeInS(aTimeInS), mIdleWindow(aIdleWindow),
       mCallOnidle(aCallOnidle)
--- a/dom/base/nsIGlobalObject.cpp
+++ b/dom/base/nsIGlobalObject.cpp
@@ -34,17 +34,17 @@ nsIGlobalObject::RegisterHostObjectURI(c
 void
 nsIGlobalObject::UnregisterHostObjectURI(const nsACString& aURI)
 {
   mHostObjectURIs.RemoveElement(aURI);
 }
 
 namespace {
 
-class UnlinkHostObjectURIsRunnable final : public nsRunnable
+class UnlinkHostObjectURIsRunnable final : public mozilla::Runnable
 {
 public:
   explicit UnlinkHostObjectURIsRunnable(nsTArray<nsCString>& aURIs)
   {
     mURIs.SwapElements(aURIs);
   }
 
   NS_IMETHOD Run() override
--- a/dom/base/nsInProcessTabChildGlobal.cpp
+++ b/dom/base/nsInProcessTabChildGlobal.cpp
@@ -299,17 +299,17 @@ nsInProcessTabChildGlobal::InitTabChildG
     id.AppendLiteral("?ownedBy=");
     id.Append(u);
   }
   nsISupports* scopeSupports = NS_ISUPPORTS_CAST(EventTarget*, this);
   NS_ENSURE_STATE(InitChildGlobalInternal(scopeSupports, id));
   return NS_OK;
 }
 
-class nsAsyncScriptLoad : public nsRunnable
+class nsAsyncScriptLoad : public Runnable
 {
 public:
     nsAsyncScriptLoad(nsInProcessTabChildGlobal* aTabChild, const nsAString& aURL,
                       bool aRunInGlobalScope)
       : mTabChild(aTabChild), mURL(aURL), mRunInGlobalScope(aRunInGlobalScope) {}
 
   NS_IMETHOD Run()
   {
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -414,17 +414,17 @@ NS_HandleScriptError(nsIScriptGlobalObje
                                         aStatus);
       called = true;
     }
     --errorDepth;
   }
   return called;
 }
 
-class ScriptErrorEvent : public nsRunnable
+class ScriptErrorEvent : public Runnable
 {
 public:
   ScriptErrorEvent(nsPIDOMWindowInner* aWindow,
                    JSRuntime* aRuntime,
                    xpc::ErrorReport* aReport,
                    JS::Handle<JS::Value> aError)
     : mWindow(aWindow)
     , mReport(aReport)
@@ -2175,17 +2175,17 @@ nsJSContext::KillICCTimer()
   sCCLockedOutTime = 0;
 
   if (sICCTimer) {
     sICCTimer->Cancel();
     NS_RELEASE(sICCTimer);
   }
 }
 
-class NotifyGCEndRunnable : public nsRunnable
+class NotifyGCEndRunnable : public Runnable
 {
   nsString mMessage;
 
 public:
   explicit NotifyGCEndRunnable(const nsString& aMessage) : mMessage(aMessage) {}
 
   NS_DECL_NSIRUNNABLE
 };
--- a/dom/base/nsJSEnvironment.h
+++ b/dom/base/nsJSEnvironment.h
@@ -181,17 +181,17 @@ void ShutdownJSEnvironment();
 
 // Get the NameSpaceManager, creating if necessary
 nsScriptNameSpaceManager* GetNameSpaceManager();
 
 // Peek the NameSpaceManager, without creating it.
 nsScriptNameSpaceManager* PeekNameSpaceManager();
 
 // Runnable that's used to do async error reporting
-class AsyncErrorReporter final : public nsRunnable
+class AsyncErrorReporter final : public mozilla::Runnable
 {
 public:
   // aWindow may be null if this error report is not associated with a window
   explicit AsyncErrorReporter(xpc::ErrorReport* aReport)
     : mReport(aReport)
   {}
 
   NS_IMETHOD Run() override
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -135,17 +135,17 @@ InActiveDocument(nsIContent *aContent)
   nsIDocument *doc = aContent->OwnerDoc();
   return (doc && doc->IsActive());
 }
 
 ///
 /// Runnables and helper classes
 ///
 
-class nsAsyncInstantiateEvent : public nsRunnable {
+class nsAsyncInstantiateEvent : public Runnable {
 public:
   explicit nsAsyncInstantiateEvent(nsObjectLoadingContent* aContent)
   : mContent(aContent) {}
 
   ~nsAsyncInstantiateEvent() {}
 
   NS_IMETHOD Run();
 
@@ -168,17 +168,17 @@ nsAsyncInstantiateEvent::Run()
 
   return objLC->SyncStartPluginInstance();
 }
 
 // Checks to see if the content for a plugin instance should be unloaded
 // (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 nsRunnable {
+class CheckPluginStopEvent : public Runnable {
 public:
   explicit CheckPluginStopEvent(nsObjectLoadingContent* aContent)
   : mContent(aContent) {}
 
   ~CheckPluginStopEvent() {}
 
   NS_IMETHOD Run();
 
@@ -243,17 +243,17 @@ CheckPluginStopEvent::Run()
   objLC->StopPluginInstance();
 
   return NS_OK;
 }
 
 /**
  * Helper task for firing simple events
  */
-class nsSimplePluginEvent : public nsRunnable {
+class nsSimplePluginEvent : public Runnable {
 public:
   nsSimplePluginEvent(nsIContent* aTarget, const nsAString &aEvent)
     : mTarget(aTarget)
     , mDocument(aTarget->GetComposedDoc())
     , mEvent(aEvent)
   {
     MOZ_ASSERT(aTarget && mDocument);
   }
@@ -296,17 +296,17 @@ nsSimplePluginEvent::Run()
                                          mEvent, true, true);
   }
   return NS_OK;
 }
 
 /**
  * A task for firing PluginCrashed DOM Events.
  */
-class nsPluginCrashedEvent : public nsRunnable {
+class nsPluginCrashedEvent : public Runnable {
 public:
   nsCOMPtr<nsIContent> mContent;
   nsString mPluginDumpID;
   nsString mBrowserDumpID;
   nsString mPluginName;
   nsString mPluginFilename;
   bool mSubmittedCrashReport;
 
@@ -355,46 +355,46 @@ nsPluginCrashedEvent::Run()
 
   event->SetTrusted(true);
   event->WidgetEventPtr()->mFlags.mOnlyChromeDispatch = true;
 
   EventDispatcher::DispatchDOMEvent(mContent, nullptr, event, nullptr, nullptr);
   return NS_OK;
 }
 
-class nsStopPluginRunnable : public nsRunnable, public nsITimerCallback
+class nsStopPluginRunnable : public Runnable, public nsITimerCallback
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   nsStopPluginRunnable(nsPluginInstanceOwner* aInstanceOwner,
                        nsObjectLoadingContent* aContent)
     : mInstanceOwner(aInstanceOwner)
     , mContent(aContent)
   {
     NS_ASSERTION(aInstanceOwner, "need an owner");
     NS_ASSERTION(aContent, "need a nsObjectLoadingContent");
   }
 
-  // nsRunnable
+  // Runnable
   NS_IMETHOD Run() override;
 
   // nsITimerCallback
   NS_IMETHOD Notify(nsITimer* timer) override;
 
 protected:
   virtual ~nsStopPluginRunnable() {}
 
 private:
   nsCOMPtr<nsITimer> mTimer;
   RefPtr<nsPluginInstanceOwner> mInstanceOwner;
   nsCOMPtr<nsIObjectLoadingContent> mContent;
 };
 
-NS_IMPL_ISUPPORTS_INHERITED(nsStopPluginRunnable, nsRunnable, nsITimerCallback)
+NS_IMPL_ISUPPORTS_INHERITED(nsStopPluginRunnable, Runnable, nsITimerCallback)
 
 NS_IMETHODIMP
 nsStopPluginRunnable::Notify(nsITimer *aTimer)
 {
   return Run();
 }
 
 NS_IMETHODIMP
--- a/dom/base/nsReferencedElement.cpp
+++ b/dom/base/nsReferencedElement.cpp
@@ -210,17 +210,17 @@ nsReferencedElement::Observe(Element* aO
   if (!keepTracking) {
     p->mWatchDocument = nullptr;
     p->mWatchID = nullptr;
   }
   return keepTracking;
 }
 
 NS_IMPL_ISUPPORTS_INHERITED0(nsReferencedElement::ChangeNotification,
-                             nsRunnable)
+                             mozilla::Runnable)
 
 NS_IMPL_ISUPPORTS(nsReferencedElement::DocumentLoadNotification,
                   nsIObserver)
 
 NS_IMETHODIMP
 nsReferencedElement::DocumentLoadNotification::Observe(nsISupports* aSubject,
                                                        const char* aTopic,
                                                        const char16_t* aData)
--- a/dom/base/nsReferencedElement.h
+++ b/dom/base/nsReferencedElement.h
@@ -118,17 +118,17 @@ private:
     explicit Notification(nsReferencedElement* aTarget)
       : mTarget(aTarget)
     {
       NS_PRECONDITION(aTarget, "Must have a target");
     }
     nsReferencedElement* mTarget;
   };
 
-  class ChangeNotification : public nsRunnable,
+  class ChangeNotification : public mozilla::Runnable,
                              public Notification
   {
   public:
     ChangeNotification(nsReferencedElement* aTarget,
                        Element* aFrom, Element* aTo)
       : Notification(aTarget), mFrom(aFrom), mTo(aTo)
     {}
 
--- a/dom/base/nsScriptLoader.cpp
+++ b/dom/base/nsScriptLoader.cpp
@@ -368,17 +368,17 @@ bool
 nsScriptLoader::PreloadURIComparator::Equals(const PreloadInfo &aPi,
                                              nsIURI * const &aURI) const
 {
   bool same;
   return NS_SUCCEEDED(aPi.mRequest->mURI->Equals(aURI, &same)) &&
          same;
 }
 
-class nsScriptRequestProcessor : public nsRunnable
+class nsScriptRequestProcessor : public Runnable
 {
 private:
   RefPtr<nsScriptLoader> mLoader;
   RefPtr<nsScriptLoadRequest> mRequest;
 public:
   nsScriptRequestProcessor(nsScriptLoader* aLoader,
                            nsScriptLoadRequest* aRequest)
     : mLoader(aLoader)
@@ -723,17 +723,17 @@ nsScriptLoader::ProcessScriptElement(nsI
   // is on the call stack.
   NS_ASSERTION(nsContentUtils::IsSafeToRunScript(),
       "Not safe to run a parser-inserted script?");
   return ProcessRequest(request) == NS_ERROR_HTMLPARSER_BLOCK;
 }
 
 namespace {
 
-class NotifyOffThreadScriptLoadCompletedRunnable : public nsRunnable
+class NotifyOffThreadScriptLoadCompletedRunnable : public Runnable
 {
   RefPtr<nsScriptLoadRequest> mRequest;
   RefPtr<nsScriptLoader> mLoader;
   void *mToken;
 
 public:
   NotifyOffThreadScriptLoadCompletedRunnable(nsScriptLoadRequest* aRequest,
                                              nsScriptLoader* aLoader)
--- a/dom/base/nsXMLHttpRequest.cpp
+++ b/dom/base/nsXMLHttpRequest.cpp
@@ -146,17 +146,17 @@ using namespace mozilla::dom;
     nsCString tmp;                                                              \
     _name(tmp);                                                                 \
     aOut = tmp;                                                                 \
     return NS_OK;                                                               \
   }
 
 NS_IMPL_ISUPPORTS(nsXHRParseEndListener, nsIDOMEventListener)
 
-class nsResumeTimeoutsEvent : public nsRunnable
+class nsResumeTimeoutsEvent : public Runnable
 {
 public:
   explicit nsResumeTimeoutsEvent(nsPIDOMWindowInner* aWindow) : mWindow(aWindow) {}
 
   NS_IMETHOD Run()
   {
     mWindow->ResumeTimeouts(false);
     return NS_OK;
--- a/dom/browser-element/BrowserElementAudioChannel.cpp
+++ b/dom/browser-element/BrowserElementAudioChannel.cpp
@@ -166,17 +166,17 @@ AudioChannel
 BrowserElementAudioChannel::Name() const
 {
   MOZ_ASSERT(NS_IsMainThread());
   return mAudioChannel;
 }
 
 namespace {
 
-class BaseRunnable : public nsRunnable
+class BaseRunnable : public Runnable
 {
 protected:
   nsCOMPtr<nsPIDOMWindowInner> mParentWindow;
   nsCOMPtr<nsPIDOMWindowOuter> mFrameWindow;
   RefPtr<DOMRequest> mRequest;
   AudioChannel mAudioChannel;
 
   virtual void DoWork(AudioChannelService* aService,
--- a/dom/cache/PrincipalVerifier.h
+++ b/dom/cache/PrincipalVerifier.h
@@ -17,17 +17,17 @@ namespace ipc {
   class PBackgroundParent;
 } // namespace ipc
 
 namespace dom {
 namespace cache {
 
 class ManagerId;
 
-class PrincipalVerifier final : public nsRunnable
+class PrincipalVerifier final : public Runnable
 {
 public:
   // An interface to be implemented by code wishing to use the
   // PrincipalVerifier.  Note, the Listener implementation is responsible
   // for calling RemoveListener() on the PrincipalVerifier to clear the
   // weak reference.
   class Listener
   {
--- a/dom/camera/CameraControlImpl.cpp
+++ b/dom/camera/CameraControlImpl.cpp
@@ -21,17 +21,17 @@ CameraControlImpl::CameraControlImpl()
   : mListenerLock("mozilla::camera::CameraControlImpl.Listeners")
   , mPreviewState(CameraControlListener::kPreviewStopped)
   , mHardwareState(CameraControlListener::kHardwareUninitialized)
   , mHardwareStateChangeReason(NS_OK)
 {
   DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   mCurrentConfiguration.mMode = ICameraControl::kUnspecifiedMode;
 
-  class Delegate : public nsRunnable
+  class Delegate : public Runnable
   {
   public:
     NS_IMETHOD
     Run()
     {
       char stackBaseGuess;
       profiler_register_thread("CameraThread", &stackBaseGuess);
       return NS_OK;
@@ -324,17 +324,17 @@ CameraControlImpl::OnSystemError(CameraC
     CameraControlListener* l = mListeners[i];
     l->OnSystemError(aContext, aError);
   }
 }
 
 // Camera control asynchronous message; these are dispatched from
 //  the Main Thread to the Camera Thread, where they are consumed.
 
-class CameraControlImpl::ControlMessage : public nsRunnable
+class CameraControlImpl::ControlMessage : public Runnable
 {
 public:
   ControlMessage(CameraControlImpl* aCameraControl,
                  CameraControlListener::UserContext aContext)
     : mCameraControl(aCameraControl)
     , mContext(aContext)
   { }
 
--- a/dom/camera/DOMCameraCapabilities.cpp
+++ b/dom/camera/DOMCameraCapabilities.cpp
@@ -17,17 +17,17 @@
 
 namespace mozilla {
 namespace dom {
 
 /**
  * CameraClosedListenerProxy and CameraClosedMessage
  */
 template<class T>
-class CameraClosedMessage : public nsRunnable
+class CameraClosedMessage : public Runnable
 {
 public:
   explicit CameraClosedMessage(nsMainThreadPtrHandle<T> aListener)
     : mListener(aListener)
   {
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
--- a/dom/camera/DOMCameraControlListener.cpp
+++ b/dom/camera/DOMCameraControlListener.cpp
@@ -25,17 +25,17 @@ DOMCameraControlListener::DOMCameraContr
 }
 
 DOMCameraControlListener::~DOMCameraControlListener()
 {
   DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
 }
 
 // Boilerplate callback runnable
-class DOMCameraControlListener::DOMCallback : public nsRunnable
+class DOMCameraControlListener::DOMCallback : public Runnable
 {
 public:
   explicit DOMCallback(nsMainThreadPtrHandle<nsISupports> aDOMCameraControl)
     : mDOMCameraControl(aDOMCameraControl)
   {
     MOZ_COUNT_CTOR(DOMCameraControlListener::DOMCallback);
   }
 
--- a/dom/camera/GonkCameraControl.cpp
+++ b/dom/camera/GonkCameraControl.cpp
@@ -963,17 +963,17 @@ android::sp<android::GonkCameraHardware>
 nsGonkCameraControl::GetCameraHw()
 {
   return mCameraHw;
 }
 
 nsresult
 nsGonkCameraControl::SetThumbnailSize(const Size& aSize)
 {
-  class SetThumbnailSize : public nsRunnable
+  class SetThumbnailSize : public Runnable
   {
   public:
     SetThumbnailSize(nsGonkCameraControl* aCameraControl, const Size& aSize)
       : mCameraControl(aCameraControl)
       , mSize(aSize)
     {
       MOZ_COUNT_CTOR(SetThumbnailSize);
     }
@@ -1081,17 +1081,17 @@ nsGonkCameraControl::RationalizeRotation
   }
 
   return r;
 }
 
 nsresult
 nsGonkCameraControl::SetPictureSize(const Size& aSize)
 {
-  class SetPictureSize : public nsRunnable
+  class SetPictureSize : public Runnable
   {
   public:
     SetPictureSize(nsGonkCameraControl* aCameraControl, const Size& aSize)
       : mCameraControl(aCameraControl)
       , mSize(aSize)
     {
       MOZ_COUNT_CTOR(SetPictureSize);
     }
@@ -1283,17 +1283,17 @@ nsGonkCameraControl::StartRecordingImpl(
   OnRecorderStateChange(CameraControlListener::kRecorderStarted);
   mCapturePoster = aOptions->createPoster;
   return NS_OK;
 }
 
 nsresult
 nsGonkCameraControl::StopRecordingImpl()
 {
-  class RecordingComplete : public nsRunnable
+  class RecordingComplete : public Runnable
   {
   public:
     RecordingComplete(already_AddRefed<DeviceStorageFile> aFile)
       : mFile(aFile)
     { }
 
     ~RecordingComplete() { }
 
@@ -1467,17 +1467,17 @@ nsGonkCameraControl::OnAutoFocusMoving(b
       OnAutoFocusComplete(true, true);
     }
   }
 }
 
 void
 nsGonkCameraControl::OnAutoFocusComplete(bool aSuccess, bool aExpired)
 {
-  class AutoFocusComplete : public nsRunnable
+  class AutoFocusComplete : public Runnable
   {
   public:
     AutoFocusComplete(nsGonkCameraControl* aCameraControl, bool aSuccess, bool aExpired)
       : mCameraControl(aCameraControl)
       , mSuccess(aSuccess)
       , mExpired(aExpired)
     { }
 
@@ -2242,17 +2242,17 @@ void
 nsGonkCameraControl::OnRateLimitPreview(bool aLimit)
 {
   CameraControlImpl::OnRateLimitPreview(aLimit);
 }
 
 void
 nsGonkCameraControl::CreatePoster(Image* aImage, uint32_t aWidth, uint32_t aHeight, int32_t aRotation)
 {
-  class PosterRunnable : public nsRunnable {
+  class PosterRunnable : public Runnable {
   public:
     PosterRunnable(nsGonkCameraControl* aTarget, Image* aImage,
                    uint32_t aWidth, uint32_t aHeight, int32_t aRotation)
       : mTarget(aTarget)
       , mImage(aImage)
       , mWidth(aWidth)
       , mHeight(aHeight)
       , mRotation(aRotation)
--- a/dom/canvas/ImageBitmap.cpp
+++ b/dom/canvas/ImageBitmap.cpp
@@ -908,17 +908,17 @@ protected:
     mPromise->MaybeResolve(mImageBitmap);
   }
 
 private:
   RefPtr<Promise> mPromise;
   RefPtr<ImageBitmap> mImageBitmap;
 };
 
-class FulfillImageBitmapPromiseTask final : public nsRunnable,
+class FulfillImageBitmapPromiseTask final : public Runnable,
                                             public FulfillImageBitmapPromise
 {
 public:
   FulfillImageBitmapPromiseTask(Promise* aPromise, ImageBitmap* aImageBitmap)
   : FulfillImageBitmapPromise(aPromise, aImageBitmap)
   {
   }
 
@@ -1098,17 +1098,17 @@ protected:
   virtual already_AddRefed<ImageBitmap> CreateImageBitmap() = 0;
 
   RefPtr<Promise> mPromise;
   nsCOMPtr<nsIGlobalObject> mGlobalObject;
   RefPtr<mozilla::dom::Blob> mBlob;
   Maybe<IntRect> mCropRect;
 };
 
-class CreateImageBitmapFromBlobTask final : public nsRunnable,
+class CreateImageBitmapFromBlobTask final : public Runnable,
                                             public CreateImageBitmapFromBlob
 {
 public:
   CreateImageBitmapFromBlobTask(Promise* aPromise,
                                 nsIGlobalObject* aGlobal,
                                 Blob& aBlob,
                                 const Maybe<IntRect>& aCropRect)
   :CreateImageBitmapFromBlob(aPromise, aGlobal, aBlob, aCropRect)
--- a/dom/canvas/WebGLQuery.h
+++ b/dom/canvas/WebGLQuery.h
@@ -18,17 +18,17 @@ class WebGLQuery final
     : public nsWrapperCache
     , public WebGLRefCountedObject<WebGLQuery>
     , public LinkedListElement<WebGLQuery>
     , public WebGLContextBoundObject
 {
 public:
     explicit WebGLQuery(WebGLContext* webgl);
 
-    class AvailableRunnable final : public nsRunnable
+    class AvailableRunnable final : public Runnable
     {
     public:
         explicit AvailableRunnable(WebGLQuery* query) : mQuery(query) { }
 
         NS_IMETHOD Run() override {
             mQuery->mCanBeAvailable = true;
             return NS_OK;
         }
--- a/dom/devicestorage/DeviceStorageRequestParent.h
+++ b/dom/devicestorage/DeviceStorageRequestParent.h
@@ -36,17 +36,18 @@ public:
 protected:
   ~DeviceStorageRequestParent();
 
 private:
   ThreadSafeAutoRefCnt mRefCnt;
   NS_DECL_OWNINGTHREAD
   DeviceStorageParams mParams;
 
-  class CancelableRunnable : public nsRunnable
+  // XXXkhuey name collision :(
+  class CancelableRunnable : public Runnable
   {
   public:
     explicit CancelableRunnable(DeviceStorageRequestParent* aParent)
       : mParent(aParent)
     {
       mCanceled = !(mParent->AddRunnable(this));
     }
 
--- a/dom/devicestorage/nsDeviceStorage.cpp
+++ b/dom/devicestorage/nsDeviceStorage.cpp
@@ -482,17 +482,17 @@ DeviceStorageTypeChecker::IsSharedMediaR
   return IsMediaType(aType);
 #else
   // For desktop, if the directories have been overridden, then they share
   // a common root.
   return IsMediaType(aType) && DeviceStorageStatics::HasOverrideRootDir();
 #endif
 }
 
-class IOEventComplete : public nsRunnable
+class IOEventComplete : public Runnable
 {
 public:
   IOEventComplete(DeviceStorageFile *aFile, const char *aType)
     : mFile(aFile)
     , mType(aType)
   {
   }
 
--- a/dom/devicestorage/nsDeviceStorage.h
+++ b/dom/devicestorage/nsDeviceStorage.h
@@ -95,17 +95,17 @@ class DeviceStorageUsedSpaceCache final
 {
 public:
   static DeviceStorageUsedSpaceCache* CreateOrGet();
 
   DeviceStorageUsedSpaceCache();
   ~DeviceStorageUsedSpaceCache();
 
 
-  class InvalidateRunnable final : public nsRunnable
+  class InvalidateRunnable final : public mozilla::Runnable
   {
     public:
       InvalidateRunnable(DeviceStorageUsedSpaceCache* aCache, 
                          const nsAString& aStorageName)
         : mCache(aCache)
         , mStorageName(aStorageName) {}
 
       ~InvalidateRunnable() {}
@@ -299,17 +299,17 @@ private:
   mozilla::Mutex mMutex;
   uint32_t mPermissionCache[DEVICE_STORAGE_ACCESS_COUNT];
   bool mShutdown;
 
   static mozilla::Atomic<uint32_t> sLastRequestId;
 };
 
 class DeviceStorageRequest
-  : public nsRunnable
+  : public mozilla::Runnable
 {
 protected:
   DeviceStorageRequest();
 
 public:
   virtual void Initialize(DeviceStorageRequestManager* aManager,
                           already_AddRefed<DeviceStorageFile>&& aFile,
                           uint32_t aRequest);
--- a/dom/events/IMEContentObserver.h
+++ b/dom/events/IMEContentObserver.h
@@ -190,17 +190,17 @@ private:
   nsCOMPtr<nsINode> mEditableNode;
   nsCOMPtr<nsIDocShell> mDocShell;
   nsCOMPtr<nsIEditor> mEditor;
 
   /**
    * Helper classes to notify IME.
    */
 
-  class AChangeEvent: public nsRunnable
+  class AChangeEvent: public Runnable
   {
   protected:
     enum ChangeEventType
     {
       eChangeEventType_Focus,
       eChangeEventType_Selection,
       eChangeEventType_Text,
       eChangeEventType_Position,
--- a/dom/events/IMEStateManager.cpp
+++ b/dom/events/IMEStateManager.cpp
@@ -885,17 +885,17 @@ IMEStateManager::GetNewIMEState(nsPresCo
     ("ISM:   IMEStateManager::GetNewIMEState() returns { mEnabled=%s, "
      "mOpen=%s }",
      GetIMEStateEnabledName(newIMEState.mEnabled),
      GetIMEStateSetOpenName(newIMEState.mOpen)));
   return newIMEState;
 }
 
 // Helper class, used for IME enabled state change notification
-class IMEEnabledStateChangedEvent : public nsRunnable {
+class IMEEnabledStateChangedEvent : public Runnable {
 public:
   explicit IMEEnabledStateChangedEvent(uint32_t aState)
     : mState(aState)
   {
   }
 
   NS_IMETHOD Run()
   {
--- a/dom/events/TextComposition.h
+++ b/dom/events/TextComposition.h
@@ -375,17 +375,17 @@ private:
    * Calculate composition offset then notify composition update to widget
    */
   void NotityUpdateComposition(const WidgetCompositionEvent* aCompositionEvent);
 
   /**
    * CompositionEventDispatcher dispatches the specified composition (or text)
    * event.
    */
-  class CompositionEventDispatcher : public nsRunnable
+  class CompositionEventDispatcher : public Runnable
   {
   public:
     CompositionEventDispatcher(TextComposition* aTextComposition,
                                nsINode* aEventTarget,
                                EventMessage aEventMessage,
                                const nsAString& aData,
                                bool aIsSynthesizedEvent = false);
     NS_IMETHOD Run() override;
--- a/dom/fetch/Fetch.cpp
+++ b/dom/fetch/Fetch.cpp
@@ -101,17 +101,17 @@ public:
 
   void
   OnResponseAvailableInternal(InternalResponse* aResponse) override;
 
 private:
   ~MainThreadFetchResolver();
 };
 
-class MainThreadFetchRunnable : public nsRunnable
+class MainThreadFetchRunnable : public Runnable
 {
   RefPtr<WorkerFetchResolver> mResolver;
   RefPtr<InternalRequest> mRequest;
 
 public:
   MainThreadFetchRunnable(WorkerFetchResolver* aResolver,
                           InternalRequest* aRequest)
     : mResolver(aResolver)
@@ -691,17 +691,17 @@ template <class Derived>
 NS_IMPL_RELEASE(ConsumeBodyDoneObserver<Derived>)
 template <class Derived>
 NS_INTERFACE_MAP_BEGIN(ConsumeBodyDoneObserver<Derived>)
   NS_INTERFACE_MAP_ENTRY(nsIStreamLoaderObserver)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIStreamLoaderObserver)
 NS_INTERFACE_MAP_END
 
 template <class Derived>
-class BeginConsumeBodyRunnable final : public nsRunnable
+class BeginConsumeBodyRunnable final : public Runnable
 {
   FetchBody<Derived>* mFetchBody;
 public:
   explicit BeginConsumeBodyRunnable(FetchBody<Derived>* aBody)
     : mFetchBody(aBody)
   { }
 
   NS_IMETHOD
--- a/dom/filehandle/ActorsParent.cpp
+++ b/dom/filehandle/ActorsParent.cpp
@@ -56,17 +56,17 @@ const uint32_t kThreadLimit = 5;
 const uint32_t kIdleThreadLimit = 1;
 const uint32_t kIdleThreadTimeoutMs = 30000;
 
 const uint32_t kStreamCopyBlockSize = 32768;
 
 } // namespace
 
 class FileHandleThreadPool::FileHandleQueue final
-  : public nsRunnable
+  : public Runnable
 {
   friend class FileHandleThreadPool;
 
   RefPtr<FileHandleThreadPool> mOwningFileHandleThreadPool;
   RefPtr<FileHandle> mFileHandle;
   nsTArray<RefPtr<FileHandleOp>> mQueue;
   RefPtr<FileHandleOp> mCurrentOp;
   bool mShouldFinish;
@@ -565,17 +565,17 @@ protected:
   virtual nsresult
   DoFileWork(FileHandle* aFileHandle) override;
 
   virtual void
   Cleanup() override;
 };
 
 class CopyFileHandleOp::ProgressRunnable final
-  : public nsRunnable
+  : public Runnable
 {
   RefPtr<CopyFileHandleOp> mCopyFileHandleOp;
   uint64_t mProgress;
   uint64_t mProgressMax;
 
 public:
   ProgressRunnable(CopyFileHandleOp* aCopyFileHandleOp,
                    uint64_t aProgress,
--- a/dom/filesystem/FileSystemTaskBase.h
+++ b/dom/filesystem/FileSystemTaskBase.h
@@ -202,17 +202,17 @@ private:
    * owning thread.
    */
   void
   SetRequestResult(const FileSystemResponseValue& aValue);
 };
 
 // This class is the 'alter ego' of FileSystemTaskChildBase in the PBackground
 // world.
-class FileSystemTaskParentBase : public nsRunnable
+class FileSystemTaskParentBase : public Runnable
 {
 public:
   /*
    * Start the task. This must be called from the PBackground thread only.
    */
   void
   Start();
 
--- a/dom/geolocation/nsGeolocation.cpp
+++ b/dom/geolocation/nsGeolocation.cpp
@@ -218,17 +218,17 @@ public:
     if (gs) {
       gs->HandleMozsettingValue(aValue);
     }
   }
 };
 
 NS_IMPL_ISUPPORTS(GeolocationSettingsCallback, nsISettingsServiceCallback)
 
-class RequestPromptEvent : public nsRunnable
+class RequestPromptEvent : public Runnable
 {
 public:
   RequestPromptEvent(nsGeolocationRequest* aRequest, nsWeakPtr aWindow)
     : mRequest(aRequest)
     , mWindow(aWindow)
   {
   }
 
@@ -239,17 +239,17 @@ public:
     return NS_OK;
   }
 
 private:
   RefPtr<nsGeolocationRequest> mRequest;
   nsWeakPtr mWindow;
 };
 
-class RequestAllowEvent : public nsRunnable
+class RequestAllowEvent : public Runnable
 {
 public:
   RequestAllowEvent(int allow, nsGeolocationRequest* request)
     : mAllow(allow),
       mRequest(request)
   {
   }
 
@@ -262,17 +262,17 @@ public:
     return NS_OK;
   }
 
 private:
   bool mAllow;
   RefPtr<nsGeolocationRequest> mRequest;
 };
 
-class RequestSendLocationEvent : public nsRunnable
+class RequestSendLocationEvent : public Runnable
 {
 public:
   RequestSendLocationEvent(nsIDOMGeoPosition* aPosition,
                            nsGeolocationRequest* aRequest)
     : mPosition(aPosition),
       mRequest(aRequest)
   {
   }
--- a/dom/html/HTMLFormElement.h
+++ b/dom/html/HTMLFormElement.h
@@ -431,17 +431,17 @@ protected:
     }
   };
 
   RefPtr<FormPasswordEventDispatcher> mFormPasswordEventDispatcher;
 
   class RemoveElementRunnable;
   friend class RemoveElementRunnable;
 
-  class RemoveElementRunnable : public nsRunnable {
+  class RemoveElementRunnable : public Runnable {
   public:
     explicit RemoveElementRunnable(HTMLFormElement* aForm)
       : mForm(aForm)
     {}
 
     NS_IMETHOD Run() override {
       mForm->HandleDefaultSubmitRemoval();
       return NS_OK;
--- a/dom/html/HTMLImageElement.cpp
+++ b/dom/html/HTMLImageElement.cpp
@@ -72,17 +72,17 @@ static bool IsPreviousSibling(nsINode *a
 #endif
 
 namespace mozilla {
 namespace dom {
 
 // Calls LoadSelectedImage on host element unless it has been superseded or
 // canceled -- this is the synchronous section of "update the image data".
 // https://html.spec.whatwg.org/multipage/embedded-content.html#update-the-image-data
-class ImageLoadTask : public nsRunnable
+class ImageLoadTask : public Runnable
 {
 public:
   ImageLoadTask(HTMLImageElement *aElement, bool aAlwaysLoad)
     : mElement(aElement)
     , mAlwaysLoad(aAlwaysLoad)
   {
     mDocument = aElement->OwnerDoc();
     mDocument->BlockOnload();
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -202,17 +202,17 @@ static const double THRESHOLD_LOW_PLAYBA
 // needSelfReference in AddRemoveSelfReference be followed by a call to
 // AddRemoveSelfReference before this element could die!
 // It's especially important if needSelfReference would change to 'true',
 // since if we neglect to add a self-reference, this element might be
 // garbage collected while there are still event listeners that should
 // receive events. If we neglect to remove the self-reference then the element
 // just lives longer than it needs to.
 
-class nsMediaEvent : public nsRunnable
+class nsMediaEvent : public Runnable
 {
 public:
 
   explicit nsMediaEvent(HTMLMediaElement* aElement) :
     mElement(aElement),
     mLoadID(mElement->GetCurrentLoadID()) {}
   ~nsMediaEvent() {}
 
--- a/dom/html/HTMLObjectElement.cpp
+++ b/dom/html/HTMLObjectElement.cpp
@@ -117,17 +117,17 @@ NS_IMPL_NSICONSTRAINTVALIDATION(HTMLObje
 
 static nsIWidget* GetWidget(Element* aElement)
 {
   return nsContentUtils::WidgetForDocument(aElement->OwnerDoc());
 }
 
 Element* HTMLObjectElement::sLastFocused = nullptr; // Weak
 
-class PluginFocusSetter : public nsRunnable
+class PluginFocusSetter : public Runnable
 {
 public:
   PluginFocusSetter(nsIWidget* aWidget, Element* aElement)
   : mWidget(aWidget), mElement(aElement)
   {
   }
 
   NS_IMETHOD Run()
--- a/dom/html/nsGenericHTMLElement.cpp
+++ b/dom/html/nsGenericHTMLElement.cpp
@@ -113,17 +113,17 @@
 using namespace mozilla;
 using namespace mozilla::dom;
 
 /**
  * nsAutoFocusEvent is used to dispatch a focus event when a
  * nsGenericHTMLFormElement is binded to the tree with the autofocus attribute
  * enabled.
  */
-class nsAutoFocusEvent : public nsRunnable
+class nsAutoFocusEvent : public Runnable
 {
 public:
   explicit nsAutoFocusEvent(nsGenericHTMLFormElement* aElement) : mElement(aElement) {}
 
   NS_IMETHOD Run() {
     nsFocusManager* fm = nsFocusManager::GetFocusManager();
     if (!fm) {
       return NS_ERROR_NULL_POINTER;
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -2519,17 +2519,17 @@ nsHTMLDocument::EndUpdate(nsUpdateType a
   if (reset) {
     mPendingMaybeEditingStateChanged = false;
   }
   MaybeEditingStateChanged();
 }
 
 
 // Helper class, used below in ChangeContentEditableCount().
-class DeferredContentEditableCountChangeEvent : public nsRunnable
+class DeferredContentEditableCountChangeEvent : public Runnable
 {
 public:
   DeferredContentEditableCountChangeEvent(nsHTMLDocument *aDoc,
                                           nsIContent *aElement)
     : mDoc(aDoc)
     , mElement(aElement)
   {
   }
--- a/dom/html/nsTextEditorState.cpp
+++ b/dom/html/nsTextEditorState.cpp
@@ -78,17 +78,17 @@ public:
     mEditor->SetSuppressDispatchingInputEvent(true);
   }
 
 private:
   nsCOMPtr<nsIEditor> mEditor;
   bool mOuterTransaction;
 };
 
-class RestoreSelectionState : public nsRunnable {
+class RestoreSelectionState : public Runnable {
 public:
   RestoreSelectionState(nsTextEditorState *aState, nsTextControlFrame *aFrame)
     : mFrame(aFrame),
       mTextEditorState(aState)
   {
   }
 
   NS_IMETHOD Run() {
@@ -1082,17 +1082,17 @@ nsTextEditorState::GetEditor()
 
 nsISelectionController*
 nsTextEditorState::GetSelectionController() const
 {
   return mSelCon;
 }
 
 // Helper class, used below in BindToFrame().
-class PrepareEditorEvent : public nsRunnable {
+class PrepareEditorEvent : public Runnable {
 public:
   PrepareEditorEvent(nsTextEditorState &aState,
                      nsIContent *aOwnerContent,
                      const nsAString &aCurrentValue)
     : mState(&aState)
     , mOwnerContent(aOwnerContent)
     , mCurrentValue(aCurrentValue)
   {
--- a/dom/indexedDB/ActorsChild.cpp
+++ b/dom/indexedDB/ActorsChild.cpp
@@ -893,17 +893,17 @@ public:
 protected:
   ~WorkerPermissionRequestChildProcessActor()
   {}
 
   virtual bool
   Recv__delete__(const uint32_t& aPermission) override;
 };
 
-class WorkerPermissionChallenge final : public nsRunnable
+class WorkerPermissionChallenge final : public Runnable
                                       , public WorkerFeature
 {
 public:
   WorkerPermissionChallenge(WorkerPrivate* aWorkerPrivate,
                             BackgroundFactoryRequestChild* aActor,
                             IDBFactory* aFactory,
                             const PrincipalInfo& aPrincipalInfo)
     : mWorkerPrivate(aWorkerPrivate)
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -5359,17 +5359,17 @@ private:
   void
   CloseDatabase(DatabaseInfo* aDatabaseInfo);
 
   bool
   CloseDatabaseWhenIdleInternal(const nsACString& aDatabaseId);
 };
 
 class ConnectionPool::ConnectionRunnable
-  : public nsRunnable
+  : public Runnable
 {
 protected:
   DatabaseInfo* mDatabaseInfo;
   nsCOMPtr<nsIEventTarget> mOwningThread;
 
   explicit
   ConnectionRunnable(DatabaseInfo* aDatabaseInfo);
 
@@ -5507,17 +5507,17 @@ protected:
   FinishCallback()
   { }
 
   virtual ~FinishCallback()
   { }
 };
 
 class ConnectionPool::FinishCallbackWrapper final
-  : public nsRunnable
+  : public Runnable
 {
   RefPtr<ConnectionPool> mConnectionPool;
   RefPtr<FinishCallback> mCallback;
   nsCOMPtr<nsIEventTarget> mOwningThread;
   uint64_t mTransactionId;
   bool mHasRunOnce;
 
 public:
@@ -5600,17 +5600,17 @@ public:
   bool
   operator<(const IdleThreadInfo& aOther) const
   {
     return mIdleTime < aOther.mIdleTime;
   }
 };
 
 class ConnectionPool::ThreadRunnable final
-  : public nsRunnable
+  : public Runnable
 {
   // Only touched on the background thread.
   static uint32_t sNextSerialNumber;
 
   // Set at construction for logging.
   const uint32_t mSerialNumber;
 
   // These two values are only modified on the connection thread.
@@ -5685,17 +5685,17 @@ private:
   ~TransactionInfoPair();
 };
 
 /*******************************************************************************
  * Actor class declarations
  ******************************************************************************/
 
 class DatabaseOperationBase
-  : public nsRunnable
+  : public Runnable
   , public mozIStorageProgressHandler
 {
   friend class UpgradeFileIdsFunction;
 
 protected:
   class AutoSetProgressHandler;
 
   typedef nsDataHashtable<nsUint64HashKey, bool> UniqueIndexTable;
@@ -6074,17 +6074,17 @@ private:
                                    override;
 
   virtual bool
   DeallocPBackgroundIDBDatabaseParent(PBackgroundIDBDatabaseParent* aActor)
                                       override;
 };
 
 class WaitForTransactionsHelper final
-  : public nsRunnable
+  : public Runnable
 {
   nsCOMPtr<nsIEventTarget> mOwningThread;
   const nsCString mDatabaseId;
   nsCOMPtr<nsIRunnable> mCallback;
 
   enum class State
   {
     Initial = 0,
@@ -8532,17 +8532,17 @@ private:
                         const int64_t& aFileId,
                         int32_t* aRefCnt,
                         int32_t* aDBRefCnt,
                         int32_t* aSliceRefCnt,
                         bool* aResult) override;
 };
 
 class GetFileReferencesHelper final
-  : public nsRunnable
+  : public Runnable
 {
   PersistenceType mPersistenceType;
   nsCString mOrigin;
   nsString mDatabaseName;
   int64_t mFileId;
 
   mozilla::Mutex mMutex;
   mozilla::CondVar mCondVar;
@@ -8578,17 +8578,17 @@ public:
 
 private:
   ~GetFileReferencesHelper() {}
 
   NS_DECL_NSIRUNNABLE
 };
 
 class FlushPendingFileDeletionsRunnable final
-  : public nsRunnable
+  : public Runnable
 {
 private:
   ~FlushPendingFileDeletionsRunnable()
   { }
 
   NS_DECL_NSIRUNNABLE
 };
 
@@ -8907,17 +8907,17 @@ private:
 
   // Runs on the PBackground thread. Checks to see if there's a queued
   // Maintenance to run.
   void
   ProcessMaintenanceQueue();
 };
 
 class Maintenance final
-  : public nsRunnable
+  : public Runnable
   , public OpenDirectoryListener
 {
   struct DirectoryInfo;
 
   enum class State
   {
     // Newly created on the PBackground thread. Will proceed immediately or be
     // added to the maintenance queue. The next step is either
@@ -9135,17 +9135,17 @@ struct Maintenance::DirectoryInfo final
   {
     MOZ_COUNT_DTOR(Maintenance::DirectoryInfo);
   }
 
   DirectoryInfo(const DirectoryInfo& aOther) = delete;
 };
 
 class DatabaseMaintenance final
-  : public nsRunnable
+  : public Runnable
 {
   // The minimum amount of time that has passed since the last vacuum before we
   // will attempt to analyze the database for fragmentation.
   static const PRTime kMinVacuumAge =
     PRTime(PR_USEC_PER_SEC) * 60 * 60 * 24 * 7;
 
   // If the percent of database pages that are not in contiguous order is higher
   // than this percentage we will attempt a vacuum.
@@ -11924,17 +11924,17 @@ ConnectionPool::ScheduleTransaction(Tran
           created = true;
         } else {
           NS_WARNING("Failed to make new thread!");
         }
       } else if (!mDatabasesPerformingIdleMaintenance.IsEmpty()) {
         // We need a thread right now so force all idle processing to stop by
         // posting a dummy runnable to each thread that might be doing idle
         // maintenance.
-        nsCOMPtr<nsIRunnable> runnable = new nsRunnable();
+        nsCOMPtr<nsIRunnable> runnable = new Runnable();
 
         for (uint32_t index = mDatabasesPerformingIdleMaintenance.Length();
              index > 0;
              index--) {
           DatabaseInfo* dbInfo = mDatabasesPerformingIdleMaintenance[index - 1];
           MOZ_ASSERT(dbInfo);
           MOZ_ASSERT(dbInfo->mThreadInfo.mThread);
 
@@ -12557,17 +12557,17 @@ FinishCallbackWrapper::FinishCallbackWra
 
 ConnectionPool::
 FinishCallbackWrapper::~FinishCallbackWrapper()
 {
   MOZ_ASSERT(!mConnectionPool);
   MOZ_ASSERT(!mCallback);
 }
 
-NS_IMPL_ISUPPORTS_INHERITED0(ConnectionPool::FinishCallbackWrapper, nsRunnable)
+NS_IMPL_ISUPPORTS_INHERITED0(ConnectionPool::FinishCallbackWrapper, Runnable)
 
 nsresult
 ConnectionPool::
 FinishCallbackWrapper::Run()
 {
   MOZ_ASSERT(mConnectionPool);
   MOZ_ASSERT(mCallback);
   MOZ_ASSERT(mOwningThread);
@@ -12617,17 +12617,17 @@ ThreadRunnable::ThreadRunnable()
 
 ConnectionPool::
 ThreadRunnable::~ThreadRunnable()
 {
   MOZ_ASSERT(!mFirstRun);
   MOZ_ASSERT(!mContinueRunning);
 }
 
-NS_IMPL_ISUPPORTS_INHERITED0(ConnectionPool::ThreadRunnable, nsRunnable)
+NS_IMPL_ISUPPORTS_INHERITED0(ConnectionPool::ThreadRunnable, Runnable)
 
 nsresult
 ConnectionPool::
 ThreadRunnable::Run()
 {
 #ifdef MOZ_ENABLE_PROFILER_SPS
   char stackTopGuess;
 #endif // MOZ_ENABLE_PROFILER_SPS
@@ -13330,18 +13330,17 @@ WaitForTransactionsHelper::CallCallback(
   nsCOMPtr<nsIRunnable> callback;
   mCallback.swap(callback);
 
   callback->Run();
 
   mState = State::Complete;
 }
 
-NS_IMPL_ISUPPORTS_INHERITED0(WaitForTransactionsHelper,
-                             nsRunnable)
+NS_IMPL_ISUPPORTS_INHERITED0(WaitForTransactionsHelper, Runnable)
 
 NS_IMETHODIMP
 WaitForTransactionsHelper::Run()
 {
   MOZ_ASSERT(mState != State::Complete);
   MOZ_ASSERT(mCallback);
 
   switch (mState) {
@@ -17742,17 +17741,17 @@ Maintenance::Finish()
 
   mDirectoryLock = nullptr;
 
   mQuotaClient->NoteFinishedMaintenance(this);
 
   mState = State::Complete;
 }
 
-NS_IMPL_ISUPPORTS_INHERITED0(Maintenance, nsRunnable)
+NS_IMPL_ISUPPORTS_INHERITED0(Maintenance, Runnable)
 
 NS_IMETHODIMP
 Maintenance::Run()
 {
   MOZ_ASSERT(mState != State::Complete);
 
   nsresult rv;
 
@@ -19387,17 +19386,17 @@ DatabaseOperationBase::ObjectStoreHasInd
     return rv;
   }
 
   *aHasIndexes = hasResult;
   return NS_OK;
 }
 
 NS_IMPL_ISUPPORTS_INHERITED(DatabaseOperationBase,
-                            nsRunnable,
+                            Runnable,
                             mozIStorageProgressHandler)
 
 NS_IMETHODIMP
 DatabaseOperationBase::OnProgress(mozIStorageConnection* aConnection,
                                   bool* _retval)
 {
   MOZ_ASSERT(!IsOnBackgroundThread());
   MOZ_ASSERT(aConnection);
--- a/dom/indexedDB/FileInfo.cpp
+++ b/dom/indexedDB/FileInfo.cpp
@@ -45,17 +45,17 @@ private:
   virtual int64_t
   Id() const override
   {
     return int64_t(mFileId);
   }
 };
 
 class CleanupFileRunnable final
-  : public nsRunnable
+  : public Runnable
 {
   RefPtr<FileManager> mFileManager;
   int64_t mFileId;
 
 public:
   static void
   DoCleanup(FileManager* aFileManager, int64_t aFileId);
 
@@ -238,17 +238,17 @@ CleanupFileRunnable::DoCleanup(FileManag
   RefPtr<IndexedDatabaseManager> mgr = IndexedDatabaseManager::Get();
   MOZ_ASSERT(mgr);
 
   if (NS_FAILED(mgr->AsyncDeleteFile(aFileManager, aFileId))) {
     NS_WARNING("Failed to delete file asynchronously!");
   }
 }
 
-NS_IMPL_ISUPPORTS_INHERITED0(CleanupFileRunnable, nsRunnable)
+NS_IMPL_ISUPPORTS_INHERITED0(CleanupFileRunnable, Runnable)
 
 NS_IMETHODIMP
 CleanupFileRunnable::Run()
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   DoCleanup(mFileManager, mFileId);
 
--- a/dom/indexedDB/FileSnapshot.cpp
+++ b/dom/indexedDB/FileSnapshot.cpp
@@ -94,17 +94,17 @@ private:
   }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIINPUTSTREAM
   NS_DECL_NSIIPCSERIALIZABLEINPUTSTREAM
 };
 
 class StreamWrapper::CloseRunnable final
-  : public nsRunnable
+  : public Runnable
 {
   friend class StreamWrapper;
 
   RefPtr<StreamWrapper> mStreamWrapper;
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
@@ -278,17 +278,17 @@ StreamWrapper::Deserialize(const InputSt
   if (stream) {
     return stream->Deserialize(aParams, aFileDescriptors);
   }
 
   return false;
 }
 
 NS_IMPL_ISUPPORTS_INHERITED0(StreamWrapper::CloseRunnable,
-                             nsRunnable)
+                             Runnable)
 
 NS_IMETHODIMP
 StreamWrapper::
 CloseRunnable::Run()
 {
   mStreamWrapper->Finish();
 
   return NS_OK;
--- a/dom/indexedDB/ScriptErrorHelper.cpp
+++ b/dom/indexedDB/ScriptErrorHelper.cpp
@@ -11,17 +11,17 @@
 #include "nsContentUtils.h"
 #include "nsIConsoleService.h"
 #include "nsIScriptError.h"
 #include "nsString.h"
 #include "nsThreadUtils.h"
 
 namespace {
 
-class ScriptErrorRunnable final : public nsRunnable
+class ScriptErrorRunnable final : public mozilla::Runnable
 {
   nsString mMessage;
   nsCString mMessageName;
   nsString mFilename;
   uint32_t mLineNumber;
   uint32_t mColumnNumber;
   uint32_t mSeverityFlag;
   uint64_t mInnerWindowID;
--- a/dom/inputport/FakeInputPortService.cpp
+++ b/dom/inputport/FakeInputPortService.cpp
@@ -11,17 +11,17 @@
 #include "nsITimer.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
 
 namespace mozilla {
 namespace dom {
 
 namespace {
-class InputPortServiceNotifyRunnable final : public nsRunnable
+class InputPortServiceNotifyRunnable final : public Runnable
 {
 public:
   InputPortServiceNotifyRunnable(
       nsIInputPortServiceCallback* aCallback,
       nsIArray* aDataList,
       uint16_t aErrorCode = nsIInputPortServiceCallback::INPUTPORT_ERROR_OK)
     : mCallback(aCallback)
     , mDataList(aDataList)
--- a/dom/ipc/Blob.cpp
+++ b/dom/ipc/Blob.cpp
@@ -1451,17 +1451,17 @@ private:
 
 // Each instance of this class will be dispatched to the network stream thread
 // pool to run the first time where it will open the file input stream. It will
 // then dispatch itself back to the owning thread to send the child process its
 // response (assuming that the child has not crashed). The runnable will then
 // dispatch itself to the thread pool again in order to close the file input
 // stream.
 class BlobParent::OpenStreamRunnable final
-  : public nsRunnable
+  : public Runnable
 {
   friend class nsRevocableEventPtr<OpenStreamRunnable>;
 
   // Only safe to access these pointers if mRevoked is false!
   BlobParent* mBlobActor;
   InputStreamParent* mStreamActor;
 
   nsCOMPtr<nsIInputStream> mStream;
@@ -1680,17 +1680,17 @@ private:
     if (!mClosing) {
       return OpenStream();
     }
 
     return CloseStream();
   }
 };
 
-NS_IMPL_ISUPPORTS_INHERITED0(BlobParent::OpenStreamRunnable, nsRunnable)
+NS_IMPL_ISUPPORTS_INHERITED0(BlobParent::OpenStreamRunnable, Runnable)
 
 /*******************************************************************************
  * BlobChild::RemoteBlobImpl Declaration
  ******************************************************************************/
 
 class BlobChild::RemoteBlobImpl
   : public BlobImplBase
   , public nsIRemoteBlob
@@ -1819,17 +1819,17 @@ protected:
   void
   CommonInit(BlobChild* aActor);
 
   void
   Destroy();
 };
 
 class BlobChild::RemoteBlobImpl::CreateStreamHelper final
-  : public nsRunnable
+  : public Runnable
 {
   Monitor mMonitor;
   RefPtr<RemoteBlobImpl> mRemoteBlobImpl;
   RefPtr<RemoteInputStream> mInputStream;
   const uint64_t mStart;
   const uint64_t mLength;
   bool mDone;
 
@@ -2423,17 +2423,17 @@ CreateStreamHelper::RunInternal(RemoteBl
     mDone = true;
     lock.Notify();
   } else {
     mDone = true;
   }
 }
 
 NS_IMPL_ISUPPORTS_INHERITED0(BlobChild::RemoteBlobImpl::CreateStreamHelper,
-                             nsRunnable)
+                             Runnable)
 
 NS_IMETHODIMP
 BlobChild::RemoteBlobImpl::
 CreateStreamHelper::Run()
 {
   MOZ_ASSERT(mRemoteBlobImpl);
   MOZ_ASSERT(mRemoteBlobImpl->ActorEventTargetIsOnCurrentThread());
 
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -1997,17 +1997,17 @@ ContentParent::RecvDeallocateLayerTreeId
   return true;
 }
 
 namespace {
 
 // This runnable only exists to delegate ownership of the
 // ContentParent to this runnable, until it's deleted by the event
 // system.
-struct DelayedDeleteContentParentTask : public nsRunnable
+struct DelayedDeleteContentParentTask : public Runnable
 {
   explicit DelayedDeleteContentParentTask(ContentParent* aObj) : mObj(aObj) { }
 
   // No-op
   NS_IMETHODIMP Run() { return NS_OK; }
 
   RefPtr<ContentParent> mObj;
 };
--- a/dom/ipc/CrashReporterParent.cpp
+++ b/dom/ipc/CrashReporterParent.cpp
@@ -163,17 +163,17 @@ CrashReporterParent::FinalizeChildData()
 
   if (NS_IsMainThread()) {
     // Inline, this is the main thread. Get this done.
     NotifyCrashService();
     return;
   }
 
   nsCOMPtr<nsIThread> mainThread = do_GetMainThread();
-  class NotifyOnMainThread : public nsRunnable
+  class NotifyOnMainThread : public Runnable
   {
   public:
     explicit NotifyOnMainThread(CrashReporterParent* aCR)
       : mCR(aCR)
     { }
 
     NS_IMETHOD Run() {
       mCR->NotifyCrashService();
--- a/dom/ipc/FilePickerParent.h
+++ b/dom/ipc/FilePickerParent.h
@@ -71,17 +71,17 @@ class FilePickerParent : public PFilePic
     virtual ~FilePickerShownCallback() {}
     FilePickerParent* mFilePickerParent;
   };
 
  private:
   bool CreateFilePicker();
 
   // This runnable is used to do some I/O operation on a separate thread.
-  class IORunnable : public nsRunnable
+  class IORunnable : public Runnable
   {
     FilePickerParent* mFilePickerParent;
     nsTArray<nsCOMPtr<nsIFile>> mFiles;
     nsTArray<BlobImplOrString> mResults;
     nsCOMPtr<nsIEventTarget> mEventTarget;
     bool mIsDirectory;
 
   public:
--- a/dom/ipc/ProcessHangMonitor.cpp
+++ b/dom/ipc/ProcessHangMonitor.cpp
@@ -551,17 +551,17 @@ HangMonitorParent::Open(Transport* aTran
                         MessageLoop* aIOLoop)
 {
   MOZ_RELEASE_ASSERT(MessageLoop::current() == MonitorLoop());
 
   DebugOnly<bool> ok = PProcessHangMonitorParent::Open(aTransport, aPid, aIOLoop);
   MOZ_ASSERT(ok);
 }
 
-class HangObserverNotifier final : public nsRunnable
+class HangObserverNotifier final : public Runnable
 {
 public:
   HangObserverNotifier(HangMonitoredProcess* aProcess,
                        const HangData& aHangData,
                        const nsString& aBrowserDumpId)
     : mProcess(aProcess),
       mHangData(aHangData),
       mBrowserDumpId(aBrowserDumpId)
@@ -632,17 +632,17 @@ HangMonitorParent::RecvHangEvidence(cons
 
   nsCOMPtr<nsIRunnable> notifier =
     new HangObserverNotifier(mProcess, aHangData, crashId);
   NS_DispatchToMainThread(notifier);
 
   return true;
 }
 
-class ClearHangNotifier final : public nsRunnable
+class ClearHangNotifier final : public Runnable
 {
 public:
   explicit ClearHangNotifier(HangMonitoredProcess* aProcess)
     : mProcess(aProcess)
   {}
 
   NS_IMETHOD
   Run()
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -332,17 +332,17 @@ public:
     }
 
     void FireCallback() const
     {
         mCallback->OnCachedFileDescriptor(mPath, mFileDescriptor);
     }
 };
 
-class TabChild::CachedFileDescriptorCallbackRunnable : public nsRunnable
+class TabChild::CachedFileDescriptorCallbackRunnable : public Runnable
 {
     typedef TabChild::CachedFileDescriptorInfo CachedFileDescriptorInfo;
 
     nsAutoPtr<CachedFileDescriptorInfo> mInfo;
 
 public:
     explicit CachedFileDescriptorCallbackRunnable(CachedFileDescriptorInfo* aInfo)
       : mInfo(aInfo)
@@ -368,17 +368,17 @@ private:
         MOZ_ASSERT(mInfo);
 
         mInfo->FireCallback();
         return NS_OK;
     }
 };
 
 class TabChild::DelayedDeleteRunnable final
-  : public nsRunnable
+  : public Runnable
 {
     RefPtr<TabChild> mTabChild;
 
 public:
     explicit DelayedDeleteRunnable(TabChild* aTabChild)
       : mTabChild(aTabChild)
     {
         MOZ_ASSERT(NS_IsMainThread());
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -105,17 +105,17 @@ using namespace mozilla::layout;
 using namespace mozilla::services;
 using namespace mozilla::widget;
 using namespace mozilla::jsipc;
 
 // The flags passed by the webProgress notifications are 16 bits shifted
 // from the ones registered by webProgressListeners.
 #define NOTIFY_FLAG_SHIFT 16
 
-class OpenFileAndSendFDRunnable : public nsRunnable
+class OpenFileAndSendFDRunnable : public mozilla::Runnable
 {
     const nsString mPath;
     RefPtr<TabParent> mTabParent;
     nsCOMPtr<nsIEventTarget> mEventTarget;
     PRFileDesc* mFD;
 
 public:
     OpenFileAndSendFDRunnable(const nsAString& aPath, TabParent* aTabParent)
@@ -2830,17 +2830,17 @@ TabParent::SetHasContentOpener(bool aHas
 NS_IMETHODIMP
 TabParent::NavigateByKey(bool aForward, bool aForDocumentNavigation)
 {
   Unused << SendNavigateByKey(aForward, aForDocumentNavigation);
   return NS_OK;
 }
 
 class LayerTreeUpdateRunnable final
-  : public nsRunnable
+  : public mozilla::Runnable
 {
   uint64_t mLayersId;
   bool mActive;
 
 public:
   explicit LayerTreeUpdateRunnable(uint64_t aLayersId, bool aActive)
     : mLayersId(aLayersId), mActive(aActive) {}
 
--- a/dom/media/FileBlockCache.h
+++ b/dom/media/FileBlockCache.h
@@ -45,17 +45,17 @@ namespace mozilla {
 // When WriteBlock() or MoveBlock() are called, data about how to complete
 // the block change is added to mBlockChanges, indexed by block index, and
 // the block index is appended to the mChangeIndexList. This enables
 // us to quickly tell if a block has been changed, and ensures we can perform
 // the changes in the correct order. An event is dispatched to perform the
 // changes listed in mBlockChanges to file. Read() checks mBlockChanges and
 // determines the current data to return, reading from file or from
 // mBlockChanges as necessary.
-class FileBlockCache : public nsRunnable {
+class FileBlockCache : public Runnable {
 public:
   enum {
     BLOCK_SIZE = MediaCacheStream::BLOCK_SIZE
   };
 
   FileBlockCache();
 
 protected:
--- a/dom/media/GraphDriver.cpp
+++ b/dom/media/GraphDriver.cpp
@@ -158,17 +158,17 @@ ThreadedDriver::ThreadedDriver(MediaStre
 { }
 
 ThreadedDriver::~ThreadedDriver()
 {
   if (mThread) {
     mThread->Shutdown();
   }
 }
-class MediaStreamGraphInitThreadRunnable : public nsRunnable {
+class MediaStreamGraphInitThreadRunnable : public Runnable {
 public:
   explicit MediaStreamGraphInitThreadRunnable(ThreadedDriver* aDriver)
     : mDriver(aDriver)
   {
   }
   NS_IMETHOD Run()
   {
     char aLocal;
@@ -400,17 +400,17 @@ void SystemClockDriver::WakeUp()
 
 OfflineClockDriver::OfflineClockDriver(MediaStreamGraphImpl* aGraphImpl, GraphTime aSlice)
   : ThreadedDriver(aGraphImpl),
     mSlice(aSlice)
 {
 
 }
 
-class MediaStreamGraphShutdownThreadRunnable : public nsRunnable {
+class MediaStreamGraphShutdownThreadRunnable : public Runnable {
 public:
   explicit MediaStreamGraphShutdownThreadRunnable(nsIThread* aThread)
     : mThread(aThread)
   {
   }
   NS_IMETHOD Run()
   {
     MOZ_ASSERT(NS_IsMainThread());
--- a/dom/media/GraphDriver.h
+++ b/dom/media/GraphDriver.h
@@ -523,17 +523,17 @@ private:
    * any thread safely. */
   Atomic<bool> mInCallback;
   /**
    * True if microphone is being used by this process. This is synchronized by
    * the graph's monitor. */
   bool mMicrophoneActive;
 };
 
-class AsyncCubebTask : public nsRunnable
+class AsyncCubebTask : public Runnable
 {
 public:
 
   AsyncCubebTask(AudioCallbackDriver* aDriver, AsyncCubebOperation aOperation);
 
   nsresult Dispatch(uint32_t aFlags = NS_DISPATCH_NORMAL)
   {
     nsresult rv = EnsureThread();
--- a/dom/media/Latency.cpp
+++ b/dom/media/Latency.cpp
@@ -39,17 +39,17 @@ static StaticRefPtr<AsyncLatencyLogger> 
 
 LogModule*
 GetLatencyLog()
 {
   static LazyLogModule sLog("MediaLatency");
   return sLog;
 }
 
-class LogEvent : public nsRunnable
+class LogEvent : public Runnable
 {
 public:
   LogEvent(AsyncLatencyLogger::LatencyLogIndex aIndex, uint64_t aID, int64_t aValue,
            TimeStamp aTimeStamp) :
     mIndex(aIndex),
     mID(aID),
     mValue(aValue),
     mTimeStamp(aTimeStamp)
--- a/dom/media/MediaCache.cpp
+++ b/dom/media/MediaCache.cpp
@@ -1371,17 +1371,17 @@ MediaCache::Update()
     MediaCache::ResourceStreamIterator iter(mSuspendedStatusToNotify[i]);
     while (MediaCacheStream* stream = iter.Next()) {
       stream->mClient->CacheClientNotifySuspendedStatusChanged();
     }
   }
   mSuspendedStatusToNotify.Clear();
 }
 
-class UpdateEvent : public nsRunnable
+class UpdateEvent : public Runnable
 {
 public:
   NS_IMETHOD Run()
   {
     if (gMediaCache) {
       gMediaCache->Update();
     }
     return NS_OK;
--- a/dom/media/MediaDecoderReader.cpp
+++ b/dom/media/MediaDecoderReader.cpp
@@ -219,17 +219,17 @@ MediaDecoderReader::AsyncReadMetadata()
     DECODER_WARN("ReadMetadata failed, rv=%x HasValidMedia=%d", rv, metadata->mInfo.HasValidMedia());
     return MetadataPromise::CreateAndReject(Reason::METADATA_ERROR, __func__);
   }
 
   // Success!
   return MetadataPromise::CreateAndResolve(metadata, __func__);
 }
 
-class ReRequestVideoWithSkipTask : public nsRunnable
+class ReRequestVideoWithSkipTask : public Runnable
 {
 public:
   ReRequestVideoWithSkipTask(MediaDecoderReader* aReader,
                              int64_t aTimeThreshold)
     : mReader(aReader)
     , mTimeThreshold(aTimeThreshold)
   {
   }
@@ -246,17 +246,17 @@ public:
     return NS_OK;
   }
 
 private:
   RefPtr<MediaDecoderReader> mReader;
   const int64_t mTimeThreshold;
 };
 
-class ReRequestAudioTask : public nsRunnable
+class ReRequestAudioTask : public Runnable
 {
 public:
   explicit ReRequestAudioTask(MediaDecoderReader* aReader)
     : mReader(aReader)
   {
   }
 
   NS_METHOD Run()
--- a/dom/media/MediaEventSource.h
+++ b/dom/media/MediaEventSource.h
@@ -128,17 +128,17 @@ private:
  * copy when Move is possible or |Function| takes no arguments.
  */
 template<typename Target, typename Function>
 class ListenerHelper {
   // Define our custom runnable to minimize copy of the event data.
   // NS_NewRunnableFunction will result in 2 copies of the event data.
   // One is captured by the lambda and the other is the copy of the lambda.
   template <typename... Ts>
-  class R : public nsRunnable {
+  class R : public Runnable {
   public:
     template <typename... Us>
     R(RevocableToken* aToken, const Function& aFunction, Us&&... aEvents)
       : mToken(aToken)
       , mFunction(aFunction)
       , mEvents(Forward<Us>(aEvents)...) {}
 
     template <typename... Vs, size_t... Is>
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -187,17 +187,17 @@ MediaFormatReader::Init()
     sSetupPrefCache = true;
     Preferences::AddBoolVarCache(&sIsEMEEnabled, "media.eme.enabled", false);
   }
 
   return NS_OK;
 }
 
 #ifdef MOZ_EME
-class DispatchKeyNeededEvent : public nsRunnable {
+class DispatchKeyNeededEvent : public Runnable {
 public:
   DispatchKeyNeededEvent(AbstractMediaDecoder* aDecoder,
                          nsTArray<uint8_t>& aInitData,
                          const nsString& aInitDataType)
     : mDecoder(aDecoder)
     , mInitData(aInitData)
     , mInitDataType(aInitDataType)
   {
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -393,17 +393,17 @@ private:
 };
 
 /**
  * Send an error back to content.
  * Do this only on the main thread. The onSuccess callback is also passed here
  * so it can be released correctly.
  */
 template<class SuccessCallbackType>
-class ErrorCallbackRunnable : public nsRunnable
+class ErrorCallbackRunnable : public Runnable
 {
 public:
   ErrorCallbackRunnable(
     nsCOMPtr<SuccessCallbackType>& aOnSuccess,
     nsCOMPtr<nsIDOMGetUserMediaErrorCallback>& aOnFailure,
     MediaMgrError& aError,
     uint64_t aWindowID)
     : mError(&aError)
@@ -444,17 +444,17 @@ private:
   nsCOMPtr<SuccessCallbackType> mOnSuccess;
   nsCOMPtr<nsIDOMGetUserMediaErrorCallback> mOnFailure;
   RefPtr<MediaMgrError> mError;
   uint64_t mWindowID;
   RefPtr<MediaManager> mManager; // get ref to this when creating the runnable
 };
 
 // Handle removing GetUserMediaCallbackMediaStreamListener from main thread
-class GetUserMediaListenerRemove: public nsRunnable
+class GetUserMediaListenerRemove: public Runnable
 {
 public:
   GetUserMediaListenerRemove(uint64_t aWindowID,
     GetUserMediaCallbackMediaStreamListener *aListener)
     : mWindowID(aWindowID)
     , mListener(aListener) {}
 
   NS_IMETHOD
@@ -729,17 +729,17 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED(FakeT
  *
  * Note that the various GetUserMedia Runnable classes currently allow for
  * two streams.  If we ever need to support getting more than two streams
  * at once, we could convert everything to nsTArray<RefPtr<blah> >'s,
  * though that would complicate the constructors some.  Currently the
  * GetUserMedia spec does not allow for more than 2 streams to be obtained in
  * one call, to simplify handling of constraints.
  */
-class GetUserMediaStreamRunnable : public nsRunnable
+class GetUserMediaStreamRunnable : public Runnable
 {
 public:
   GetUserMediaStreamRunnable(
     nsCOMPtr<nsIDOMGetUserMediaSuccessCallback>& aOnSuccess,
     nsCOMPtr<nsIDOMGetUserMediaErrorCallback>& aOnFailure,
     uint64_t aWindowID,
     GetUserMediaCallbackMediaStreamListener* aListener,
     const nsCString& aOrigin,
@@ -1290,17 +1290,17 @@ private:
   bool mDeviceChosen;
 public:
   nsAutoPtr<MediaManager::SourceSet> mSourceSet;
 private:
   RefPtr<MediaManager> mManager; // get ref to this when creating the runnable
 };
 
 #if defined(ANDROID) && !defined(MOZ_WIDGET_GONK)
-class GetUserMediaRunnableWrapper : public nsRunnable
+class GetUserMediaRunnableWrapper : public Runnable
 {
 public:
   // This object must take ownership of task
   GetUserMediaRunnableWrapper(GetUserMediaTask* task) :
     mTask(task) {
   }
 
   ~GetUserMediaRunnableWrapper() {
@@ -2615,17 +2615,17 @@ MediaManager::Shutdown()
 
   // Because mMediaThread is not an nsThread, we must dispatch to it so it can
   // clean up BackgroundChild. Continue stopping thread once this is done.
 
   class ShutdownTask : public Task
   {
   public:
     ShutdownTask(MediaManager* aManager,
-                 nsRunnable* aReply)
+                 Runnable* aReply)
       : mManager(aManager)
       , mReply(aReply) {}
   private:
     void
     Run() override
     {
       LOG(("MediaManager Thread Shutdown"));
       MOZ_ASSERT(MediaManager::IsInMediaThread());
@@ -2639,17 +2639,17 @@ MediaManager::Shutdown()
       // must explicitly do this before dispatching the reply, since the reply may kill us with Stop()
       mManager->mBackend = nullptr; // last reference, will invoke Shutdown() again
 
       if (NS_FAILED(NS_DispatchToMainThread(mReply.forget()))) {
         LOG(("Will leak thread: DispatchToMainthread of reply runnable failed in MediaManager shutdown"));
       }
     }
     RefPtr<MediaManager> mManager;
-    RefPtr<nsRunnable> mReply;
+    RefPtr<Runnable> mReply;
   };
 
   // Post ShutdownTask to execute on mMediaThread and pass in a lambda
   // callback to be executed back on this thread once it is done.
   //
   // The lambda callback "captures" the 'this' pointer for member access.
   // This is safe since this is guaranteed to be here since sSingleton isn't
   // cleared until the lambda function clears it.
--- a/dom/media/MediaManager.h
+++ b/dom/media/MediaManager.h
@@ -334,17 +334,17 @@ private:
 
   // Accessed from MediaStreamGraph thread, MediaManager thread, and MainThread
   // No locking needed as they're only addrefed except on the MediaManager thread
   RefPtr<AudioDevice> mAudioDevice; // threadsafe refcnt
   RefPtr<VideoDevice> mVideoDevice; // threadsafe refcnt
   RefPtr<SourceMediaStream> mStream; // threadsafe refcnt
 };
 
-class GetUserMediaNotificationEvent: public nsRunnable
+class GetUserMediaNotificationEvent: public Runnable
 {
   public:
     enum GetUserMediaStatus {
       STARTING,
       STOPPING,
       STOPPED_TRACK,
     };
     GetUserMediaNotificationEvent(GetUserMediaCallbackMediaStreamListener* aListener,
@@ -384,17 +384,17 @@ typedef enum {
   MEDIA_STOP,
   MEDIA_STOP_TRACK,
   MEDIA_DIRECT_LISTENERS,
 } MediaOperation;
 
 class MediaManager;
 class GetUserMediaTask;
 
-class ReleaseMediaOperationResource : public nsRunnable
+class ReleaseMediaOperationResource : public Runnable
 {
 public:
   ReleaseMediaOperationResource(already_AddRefed<DOMMediaStream> aStream,
     OnTracksAvailableCallback* aOnTracksAvailableCallback):
     mStream(aStream),
     mOnTracksAvailableCallback(aOnTracksAvailableCallback) {}
   NS_IMETHOD Run() override {return NS_OK;}
 private:
--- a/dom/media/MediaRecorder.cpp
+++ b/dom/media/MediaRecorder.cpp
@@ -161,17 +161,17 @@ NS_IMPL_RELEASE_INHERITED(MediaRecorder,
 class MediaRecorder::Session: public nsIObserver,
                               public PrincipalChangeObserver<MediaStreamTrack>,
                               public DOMMediaStream::TrackListener
 {
   NS_DECL_THREADSAFE_ISUPPORTS
 
   // Main thread task.
   // Create a blob event and send back to client.
-  class PushBlobRunnable : public nsRunnable
+  class PushBlobRunnable : public Runnable
   {
   public:
     explicit PushBlobRunnable(Session* aSession)
       : mSession(aSession)
     { }
 
     NS_IMETHODIMP Run()
     {
@@ -191,17 +191,17 @@ class MediaRecorder::Session: public nsI
       return NS_OK;
     }
 
   private:
     RefPtr<Session> mSession;
   };
 
   // Notify encoder error, run in main thread task. (Bug 1095381)
-  class EncoderErrorNotifierRunnable : public nsRunnable
+  class EncoderErrorNotifierRunnable : public Runnable
   {
   public:
     explicit EncoderErrorNotifierRunnable(Session* aSession)
       : mSession(aSession)
     { }
 
     NS_IMETHODIMP Run()
     {
@@ -219,17 +219,17 @@ class MediaRecorder::Session: public nsI
       return NS_OK;
     }
 
   private:
     RefPtr<Session> mSession;
   };
 
   // Fire start event and set mimeType, run in main thread task.
-  class DispatchStartEventRunnable : public nsRunnable
+  class DispatchStartEventRunnable : public Runnable
   {
   public:
     DispatchStartEventRunnable(Session* aSession, const nsAString & aEventName)
       : mSession(aSession)
       , mEventName(aEventName)
     { }
 
     NS_IMETHODIMP Run()
@@ -248,17 +248,17 @@ class MediaRecorder::Session: public nsI
 
   private:
     RefPtr<Session> mSession;
     nsString mEventName;
   };
 
   // Record thread task and it run in Media Encoder thread.
   // Fetch encoded Audio/Video data from MediaEncoder.
-  class ExtractRunnable : public nsRunnable
+  class ExtractRunnable : public Runnable
   {
   public:
     explicit ExtractRunnable(Session* aSession)
       : mSession(aSession) {}
 
     ~ExtractRunnable()
     {}
 
@@ -348,17 +348,17 @@ class MediaRecorder::Session: public nsI
       LOG(LogLevel::Debug, ("Session.NotifyTracksAvailable track type = (%d)", trackTypes));
       mSession->InitEncoder(trackTypes);
     }
   private:
     RefPtr<Session> mSession;
   };
   // Main thread task.
   // To delete RecordingSession object.
-  class DestroyRunnable : public nsRunnable
+  class DestroyRunnable : public Runnable
   {
   public:
     explicit DestroyRunnable(Session* aSession)
       : mSession(aSession) {}
 
     NS_IMETHODIMP Run()
     {
       LOG(LogLevel::Debug, ("Session.DestroyRunnable session refcnt = (%d) stopIssued %d s=(%p)",
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -888,17 +888,17 @@ SetImageToBlackPixel(PlanarYCbCrImage* a
   data.mYChannel = blackPixel;
   data.mCbChannel = blackPixel + 1;
   data.mCrChannel = blackPixel + 2;
   data.mYStride = data.mCbCrStride = 1;
   data.mPicSize = data.mYSize = data.mCbCrSize = IntSize(1, 1);
   aImage->CopyData(data);
 }
 
-class VideoFrameContainerInvalidateRunnable : public nsRunnable {
+class VideoFrameContainerInvalidateRunnable : public Runnable {
 public:
   explicit VideoFrameContainerInvalidateRunnable(VideoFrameContainer* aVideoFrameContainer)
     : mVideoFrameContainer(aVideoFrameContainer)
   {}
   NS_IMETHOD Run()
   {
     MOZ_ASSERT(NS_IsMainThread());
 
@@ -1588,17 +1588,17 @@ MediaStreamGraphImpl::ForceShutDown(Shut
     EnsureNextIterationLocked();
   }
 }
 
 /* static */ StaticRefPtr<nsIAsyncShutdownBlocker> gMediaStreamGraphShutdownBlocker;
 
 namespace {
 
-class MediaStreamGraphShutDownRunnable : public nsRunnable {
+class MediaStreamGraphShutDownRunnable : public Runnable {
 public:
   explicit MediaStreamGraphShutDownRunnable(MediaStreamGraphImpl* aGraph)
     : mGraph(aGraph)
   {}
   NS_IMETHOD Run()
   {
     NS_ASSERTION(mGraph->mDetectedNotRunning,
                  "We should know the graph thread control loop isn't running!");
@@ -1648,17 +1648,17 @@ public:
         MediaStreamGraphImpl::LIFECYCLE_WAITING_FOR_STREAM_DESTRUCTION;
     }
     return NS_OK;
   }
 private:
   RefPtr<MediaStreamGraphImpl> mGraph;
 };
 
-class MediaStreamGraphStableStateRunnable : public nsRunnable {
+class MediaStreamGraphStableStateRunnable : public Runnable {
 public:
   explicit MediaStreamGraphStableStateRunnable(MediaStreamGraphImpl* aGraph,
                                                bool aSourceIsMSG)
     : mGraph(aGraph)
     , mSourceIsMSG(aSourceIsMSG)
   {
   }
   NS_IMETHOD Run()
@@ -2580,17 +2580,17 @@ MediaStream::AddMainThreadListener(MainT
 
   mMainThreadListeners.AppendElement(aListener);
 
   // If it is not yet time to send the notification, then finish here.
   if (!mFinishedNotificationSent) {
     return;
   }
 
-  class NotifyRunnable final : public nsRunnable
+  class NotifyRunnable final : public Runnable
   {
   public:
     explicit NotifyRunnable(MediaStream* aStream)
       : mStream(aStream)
     {}
 
     NS_IMETHOD Run() override
     {
@@ -2600,17 +2600,17 @@ MediaStream::AddMainThreadListener(MainT
     }
 
   private:
     ~NotifyRunnable() {}
 
     RefPtr<MediaStream> mStream;
   };
 
-  RefPtr<nsRunnable> runnable = new NotifyRunnable(this);
+  nsCOMPtr<nsIRunnable> runnable = new NotifyRunnable(this);
   NS_WARN_IF(NS_FAILED(NS_DispatchToMainThread(runnable.forget())));
 }
 
 nsresult
 SourceMediaStream::OpenAudioInput(int aID,
                                   AudioDataListener *aListener)
 {
   if (GraphImpl()) {
@@ -3472,17 +3472,17 @@ void
 MediaStreamGraph::AddStream(MediaStream* aStream)
 {
   NS_ADDREF(aStream);
   MediaStreamGraphImpl* graph = static_cast<MediaStreamGraphImpl*>(this);
   aStream->SetGraphImpl(graph);
   graph->AppendMessage(MakeUnique<CreateMessage>(aStream));
 }
 
-class GraphStartedRunnable final : public nsRunnable
+class GraphStartedRunnable final : public Runnable
 {
 public:
   GraphStartedRunnable(AudioNodeStream* aStream, MediaStreamGraph* aGraph)
   : mStream(aStream)
   , mGraph(aGraph)
   { }
 
   NS_IMETHOD Run() {
--- a/dom/media/TextTrackList.cpp
+++ b/dom/media/TextTrackList.cpp
@@ -131,17 +131,17 @@ TextTrackList::RemoveTextTrack(TextTrack
 void
 TextTrackList::DidSeek()
 {
   for (uint32_t i = 0; i < mTextTracks.Length(); i++) {
     mTextTracks[i]->SetDirty();
   }
 }
 
-class TrackEventRunner final: public nsRunnable
+class TrackEventRunner final: public Runnable
 {
 public:
   TrackEventRunner(TextTrackList* aList, nsIDOMEvent* aEvent)
     : mList(aList)
     , mEvent(aEvent)
   {}
 
   NS_IMETHOD Run() override
--- a/dom/media/VideoUtils.h
+++ b/dom/media/VideoUtils.h
@@ -74,32 +74,32 @@ private:
   ReentrantMonitorConditionallyEnter& operator =(const ReentrantMonitorConditionallyEnter&);
   static void* operator new(size_t) CPP_THROW_NEW;
   static void operator delete(void*);
 
   ReentrantMonitor* mReentrantMonitor;
 };
 
 // Shuts down a thread asynchronously.
-class ShutdownThreadEvent : public nsRunnable
+class ShutdownThreadEvent : public Runnable
 {
 public:
   explicit ShutdownThreadEvent(nsIThread* aThread) : mThread(aThread) {}
   ~ShutdownThreadEvent() {}
   NS_IMETHOD Run() override {
     mThread->Shutdown();
     mThread = nullptr;
     return NS_OK;
   }
 private:
   nsCOMPtr<nsIThread> mThread;
 };
 
 template<class T>
-class DeleteObjectTask: public nsRunnable {
+class DeleteObjectTask: public Runnable {
 public:
   explicit DeleteObjectTask(nsAutoPtr<T>& aObject)
     : mObject(aObject)
   {
   }
   NS_IMETHOD Run() {
     NS_ASSERTION(NS_IsMainThread(), "Must be on main thread.");
     mObject = nullptr;
--- a/dom/media/android/AndroidMediaPluginHost.cpp
+++ b/dom/media/android/AndroidMediaPluginHost.cpp
@@ -37,17 +37,17 @@ Decoder::Decoder() :
 
 namespace mozilla {
 
 static char* GetResource(Decoder *aDecoder)
 {
   return static_cast<char*>(aDecoder->mResource);
 }
 
-class GetIntPrefEvent : public nsRunnable {
+class GetIntPrefEvent : public Runnable {
 public:
   GetIntPrefEvent(const char* aPref, int32_t* aResult)
     : mPref(aPref), mResult(aResult) {}
   NS_IMETHOD Run() {
     return Preferences::GetInt(mPref, mResult);
   }
 private:
   const char* mPref;
--- a/dom/media/android/AndroidMediaResourceServer.cpp
+++ b/dom/media/android/AndroidMediaResourceServer.cpp
@@ -101,17 +101,17 @@ ReadCRLF (StreamType* aStream, nsLineBuf
   }
 }
 
 // Each client HTTP request results in a thread being spawned to process it.
 // That thread has a single event dispatched to it which handles the HTTP
 // protocol. It parses the headers and forwards data from the MediaResource
 // associated with the URL back to client. When the request is complete it will
 // shutdown the thread.
-class ServeResourceEvent : public nsRunnable {
+class ServeResourceEvent : public Runnable {
 private:
   // Reading from this reads the data sent from the client.
   nsCOMPtr<nsIInputStream> mInput;
 
   // Writing to this sends data to the client.
   nsCOMPtr<nsIOutputStream> mOutput;
 
   // The AndroidMediaResourceServer that owns the MediaResource instances
--- a/dom/media/android/AndroidMediaResourceServer.h
+++ b/dom/media/android/AndroidMediaResourceServer.h
@@ -32,17 +32,17 @@ class MediaResource;
   Gecko network requests and media cache usage.
 
   The AndroidMediaResourceServer can be instantiated on any thread and
   its methods are threadsafe - they can be called on any thread.
   The server socket itself is always run on the main thread and
   this is done by the Start() static method by synchronously
   dispatching to the main thread.
 */
-class AndroidMediaResourceServer : public nsRunnable
+class AndroidMediaResourceServer : public Runnable
 {
 private:
   // Mutex protecting private members of AndroidMediaResourceServer.
   // All member variables below this point in the class definition
   // must acquire the mutex before access.
   mozilla::Mutex mMutex;
 
   // Server socket used to listen for incoming connections
--- a/dom/media/eme/CDMCallbackProxy.cpp
+++ b/dom/media/eme/CDMCallbackProxy.cpp
@@ -18,17 +18,17 @@
 namespace mozilla {
 
 CDMCallbackProxy::CDMCallbackProxy(CDMProxy* aProxy)
   : mProxy(aProxy)
 {
 
 }
 
-class SetSessionIdTask : public nsRunnable {
+class SetSessionIdTask : public Runnable {
 public:
   SetSessionIdTask(CDMProxy* aProxy,
                    uint32_t aToken,
                    const nsCString& aSessionId)
     : mProxy(aProxy)
     , mToken(aToken)
     , mSid(NS_ConvertUTF8toUTF16(aSessionId))
   {
@@ -51,17 +51,17 @@ CDMCallbackProxy::SetSessionId(uint32_t 
   MOZ_ASSERT(mProxy->IsOnGMPThread());
 
   nsCOMPtr<nsIRunnable> task(new SetSessionIdTask(mProxy,
                                                   aToken,
                                                   aSessionId));
   NS_DispatchToMainThread(task);
 }
 
-class LoadSessionTask : public nsRunnable {
+class LoadSessionTask : public Runnable {
 public:
   LoadSessionTask(CDMProxy* aProxy,
                   uint32_t aPromiseId,
                   bool aSuccess)
     : mProxy(aProxy)
     , mPid(aPromiseId)
     , mSuccess(aSuccess)
   {
@@ -92,17 +92,17 @@ void
 CDMCallbackProxy::ResolvePromise(uint32_t aPromiseId)
 {
   MOZ_ASSERT(mProxy->IsOnGMPThread());
 
   // Note: CDMProxy proxies this from non-main threads to main thread.
   mProxy->ResolvePromise(aPromiseId);
 }
 
-class RejectPromiseTask : public nsRunnable {
+class RejectPromiseTask : public Runnable {
 public:
   RejectPromiseTask(CDMProxy* aProxy,
                     uint32_t aPromiseId,
                     nsresult aException,
                     const nsCString& aMessage)
     : mProxy(aProxy)
     , mPid(aPromiseId)
     , mException(aException)
@@ -132,17 +132,17 @@ CDMCallbackProxy::RejectPromise(uint32_t
   nsCOMPtr<nsIRunnable> task;
   task = new RejectPromiseTask(mProxy,
                                aPromiseId,
                                aException,
                                aMessage);
   NS_DispatchToMainThread(task);
 }
 
-class SessionMessageTask : public nsRunnable {
+class SessionMessageTask : public Runnable {
 public:
   SessionMessageTask(CDMProxy* aProxy,
                      const nsCString& aSessionId,
                      GMPSessionMessageType aMessageType,
                      const nsTArray<uint8_t>& aMessage)
     : mProxy(aProxy)
     , mSid(NS_ConvertUTF8toUTF16(aSessionId))
     , mMsgType(aMessageType)
@@ -172,17 +172,17 @@ CDMCallbackProxy::SessionMessage(const n
   nsCOMPtr<nsIRunnable> task;
   task = new SessionMessageTask(mProxy,
                                 aSessionId,
                                 aMessageType,
                                 aMessage);
   NS_DispatchToMainThread(task);
 }
 
-class ExpirationChangeTask : public nsRunnable {
+class ExpirationChangeTask : public Runnable {
 public:
   ExpirationChangeTask(CDMProxy* aProxy,
                        const nsCString& aSessionId,
                        GMPTimestamp aExpiryTime)
     : mProxy(aProxy)
     , mSid(NS_ConvertUTF8toUTF16(aSessionId))
     , mTimestamp(aExpiryTime)
   {}
@@ -230,17 +230,17 @@ CDMCallbackProxy::SessionClosed(const ns
 
   nsCOMPtr<nsIRunnable> task;
   task = NS_NewRunnableMethodWithArg<nsString>(mProxy,
                                                &CDMProxy::OnSessionClosed,
                                                NS_ConvertUTF8toUTF16(aSessionId));
   NS_DispatchToMainThread(task);
 }
 
-class SessionErrorTask : public nsRunnable {
+class SessionErrorTask : public Runnable {
 public:
   SessionErrorTask(CDMProxy* aProxy,
                    const nsCString& aSessionId,
                    nsresult aException,
                    uint32_t aSystemCode,
                    const nsCString& aMessage)
     : mProxy(aProxy)
     , mSid(NS_ConvertUTF8toUTF16(aSessionId))
--- a/dom/media/eme/CDMProxy.h
+++ b/dom/media/eme/CDMProxy.h
@@ -263,17 +263,17 @@ private:
     RefPtr<MediaRawData> mSample;
   private:
     ~DecryptJob() {}
     MozPromiseHolder<DecryptPromise> mPromise;
   };
   // GMP thread only.
   void gmp_Decrypt(RefPtr<DecryptJob> aJob);
 
-  class RejectPromiseTask : public nsRunnable {
+  class RejectPromiseTask : public Runnable {
   public:
     RejectPromiseTask(CDMProxy* aProxy,
                       PromiseId aId,
                       nsresult aCode,
                       const nsCString& aReason)
       : mProxy(aProxy)
       , mId(aId)
       , mCode(aCode)
--- a/dom/media/gmp/GMPContentParent.cpp
+++ b/dom/media/gmp/GMPContentParent.cpp
@@ -42,17 +42,17 @@ GMPContentParent::GMPContentParent(GMPPa
 }
 
 GMPContentParent::~GMPContentParent()
 {
   XRE_GetIOMessageLoop()->PostTask(FROM_HERE,
                                    new DeleteTask<Transport>(GetTransport()));
 }
 
-class ReleaseGMPContentParent : public nsRunnable
+class ReleaseGMPContentParent : public Runnable
 {
 public:
   explicit ReleaseGMPContentParent(GMPContentParent* aToRelease)
     : mToRelease(aToRelease)
   {
   }
 
   NS_IMETHOD Run()
--- a/dom/media/gmp/GMPParent.cpp
+++ b/dom/media/gmp/GMPParent.cpp
@@ -467,17 +467,17 @@ GMPParent::Shutdown()
   // Bug 1043671 is fixed
   if (!mDeleteProcessOnlyOnUnload) {
     // Destroy ourselves and rise from the fire to save memory
     mService->ReAddOnGMPThread(self);
   } // else we've been asked to die and stay dead
   MOZ_ASSERT(mState == GMPStateNotLoaded);
 }
 
-class NotifyGMPShutdownTask : public nsRunnable {
+class NotifyGMPShutdownTask : public Runnable {
 public:
   explicit NotifyGMPShutdownTask(const nsAString& aNodeId)
     : mNodeId(aNodeId)
   {
   }
   NS_IMETHOD Run() {
     MOZ_ASSERT(NS_IsMainThread());
     nsCOMPtr<nsIObserverService> obsService = mozilla::services::GetObserverService();
@@ -1042,17 +1042,17 @@ GMPParent::RecvAsyncShutdownComplete()
     mService->SetAsyncShutdownPluginState(this, 'L',
       NS_LITERAL_CSTRING("Received AsyncShutdownComplete"));
   }
 #endif
   AbortAsyncShutdown();
   return true;
 }
 
-class RunCreateContentParentCallbacks : public nsRunnable
+class RunCreateContentParentCallbacks : public Runnable
 {
 public:
   explicit RunCreateContentParentCallbacks(GMPContentParent* aGMPContentParent)
     : mGMPContentParent(aGMPContentParent)
   {
   }
 
   void TakeCallbacks(nsTArray<UniquePtr<GetGMPContentParentCallback>>& aCallbacks)
--- a/dom/media/gmp/GMPService.cpp
+++ b/dom/media/gmp/GMPService.cpp
@@ -60,17 +60,17 @@ GetGMPLog()
 #undef __CLASS__
 #endif
 #define __CLASS__ "GMPService"
 
 namespace gmp {
 
 static StaticRefPtr<GeckoMediaPluginService> sSingletonService;
 
-class GMPServiceCreateHelper final : public nsRunnable
+class GMPServiceCreateHelper final : public mozilla::Runnable
 {
   RefPtr<GeckoMediaPluginService> mService;
 
 public:
   static already_AddRefed<GeckoMediaPluginService>
   GetOrCreate()
   {
     RefPtr<GeckoMediaPluginService> service;
--- a/dom/media/gmp/GMPServiceChild.cpp
+++ b/dom/media/gmp/GMPServiceChild.cpp
@@ -299,17 +299,17 @@ GMPServiceChild::GetAlreadyBridgedTo(nsT
 {
   aAlreadyBridgedTo.SetCapacity(mContentParents.Count());
   for (auto iter = mContentParents.Iter(); !iter.Done(); iter.Next()) {
     const uint64_t& id = iter.Key();
     aAlreadyBridgedTo.AppendElement(id);
   }
 }
 
-class OpenPGMPServiceChild : public nsRunnable
+class OpenPGMPServiceChild : public mozilla::Runnable
 {
 public:
   OpenPGMPServiceChild(UniquePtr<GMPServiceChild>&& aGMPServiceChild,
                        mozilla::ipc::Transport* aTransport,
                        base::ProcessId aOtherPid)
     : mGMPServiceChild(Move(aGMPServiceChild)),
       mTransport(aTransport),
       mOtherPid(aOtherPid)
--- a/dom/media/gmp/GMPServiceParent.cpp
+++ b/dom/media/gmp/GMPServiceParent.cpp
@@ -777,17 +777,17 @@ GeckoMediaPluginServiceParent::LoadFromE
     }
   }
 
   mScannedPluginOnDisk = true;
   RefPtr<AbstractThread> thread(GetAbstractGMPThread());
   return GenericPromise::All(thread, promises);
 }
 
-class NotifyObserversTask final : public nsRunnable {
+class NotifyObserversTask final : public mozilla::Runnable {
 public:
   explicit NotifyObserversTask(const char* aTopic, nsString aData = EmptyString())
     : mTopic(aTopic)
     , mData(aData)
   {}
   NS_IMETHOD Run() override {
     MOZ_ASSERT(NS_IsMainThread());
     nsCOMPtr<nsIObserverService> obsService = mozilla::services::GetObserverService();
@@ -873,21 +873,16 @@ GeckoMediaPluginServiceParent::RemoveAnd
 {
   MOZ_ASSERT(NS_IsMainThread());
   return GMPDispatch(
     new PathRunnable(this, aDirectory,
                      PathRunnable::EOperation::REMOVE_AND_DELETE_FROM_DISK,
                      aDefer));
 }
 
-class DummyRunnable : public nsRunnable {
-public:
-  NS_IMETHOD Run() { return NS_OK; }
-};
-
 NS_IMETHODIMP
 GeckoMediaPluginServiceParent::GetPluginVersionForAPI(const nsACString& aAPI,
                                                       nsTArray<nsCString>* aTags,
                                                       bool* aHasPlugin,
                                                       nsACString& aOutVersion)
 {
   NS_ENSURE_ARG(aTags && aTags->Length() > 0);
   NS_ENSURE_ARG(aHasPlugin);
@@ -928,17 +923,17 @@ GeckoMediaPluginServiceParent::EnsurePlu
   const char* env = nullptr;
   if (!mScannedPluginOnDisk && (env = PR_GetEnv("MOZ_GMP_PATH")) && *env) {
     // We have a MOZ_GMP_PATH environment variable which may specify the
     // location of plugins to load, and we haven't yet scanned the disk to
     // see if there are plugins there. Get the GMP thread, which will
     // cause an event to be dispatched to which scans for plugins. We
     // dispatch a sync event to the GMP thread here in order to wait until
     // after the GMP thread has scanned any paths in MOZ_GMP_PATH.
-    nsresult rv = GMPDispatch(new DummyRunnable(), NS_DISPATCH_SYNC);
+    nsresult rv = GMPDispatch(new mozilla::Runnable(), NS_DISPATCH_SYNC);
     NS_ENSURE_SUCCESS(rv, rv);
     MOZ_ASSERT(mScannedPluginOnDisk, "Should have scanned MOZ_GMP_PATH by now");
   }
 
   return NS_OK;
 }
 
 GMPParent*
@@ -1828,17 +1823,17 @@ GMPServiceParent::RecvGetGMPPluginVersio
 {
   RefPtr<GeckoMediaPluginServiceParent> service =
     GeckoMediaPluginServiceParent::GetSingleton();
   return service &&
          NS_SUCCEEDED(service->GetPluginVersionForAPI(aAPI, &aTags, aHasPlugin,
                                                       *aVersion));
 }
 
-class DeleteGMPServiceParent : public nsRunnable
+class DeleteGMPServiceParent : public mozilla::Runnable
 {
 public:
   explicit DeleteGMPServiceParent(GMPServiceParent* aToDelete)
     : mToDelete(aToDelete)
   {
   }
 
   NS_IMETHODIMP Run()
@@ -1851,17 +1846,17 @@ private:
 };
 
 void
 GMPServiceParent::ActorDestroy(ActorDestroyReason aWhy)
 {
   NS_DispatchToCurrentThread(new DeleteGMPServiceParent(this));
 }
 
-class OpenPGMPServiceParent : public nsRunnable
+class OpenPGMPServiceParent : public mozilla::Runnable
 {
 public:
   OpenPGMPServiceParent(GMPServiceParent* aGMPServiceParent,
                         mozilla::ipc::Transport* aTransport,
                         base::ProcessId aOtherPid,
                         bool* aResult)
     : mGMPServiceParent(aGMPServiceParent),
       mTransport(aTransport),
--- a/dom/media/gmp/GMPServiceParent.h
+++ b/dom/media/gmp/GMPServiceParent.h
@@ -113,17 +113,17 @@ protected:
                             const nsTArray<nsCString>& aTags,
                             UniquePtr<GetGMPContentParentCallback>&& aCallback)
     override;
 private:
   GMPParent* ClonePlugin(const GMPParent* aOriginal);
   nsresult EnsurePluginsOnDiskScanned();
   nsresult InitStorage();
 
-  class PathRunnable : public nsRunnable
+  class PathRunnable : public Runnable
   {
   public:
     enum EOperation {
       REMOVE,
       REMOVE_AND_DELETE_FROM_DISK,
     };
 
     PathRunnable(GeckoMediaPluginServiceParent* aService, const nsAString& aPath,
--- a/dom/media/gtest/TestGMPCrossOrigin.cpp
+++ b/dom/media/gtest/TestGMPCrossOrigin.cpp
@@ -346,17 +346,17 @@ private:
   virtual ~GMPShutdownObserver() {}
   nsCOMPtr<nsIRunnable> mShutdownTask;
   nsCOMPtr<nsIRunnable> mContinuation;
   const nsString mNodeId;
 };
 
 NS_IMPL_ISUPPORTS(GMPShutdownObserver, nsIRunnable, nsIObserver)
 
-class NotifyObserversTask : public nsRunnable {
+class NotifyObserversTask : public Runnable {
 public:
   explicit NotifyObserversTask(const char* aTopic)
     : mTopic(aTopic)
   {}
   NS_IMETHOD Run() {
     MOZ_ASSERT(NS_IsMainThread());
     nsCOMPtr<nsIObserverService> observerService =
         mozilla::services::GetObserverService();
@@ -616,17 +616,17 @@ class GMPStorageTest : public GMPDecrypt
                        const nsAString& aTopLevelOrigin,
                        bool aInPBMode,
                        const nsCString& aUpdate)
   {
     nsTArray<nsCString> updates;
     updates.AppendElement(aUpdate);
     CreateDecryptor(aOrigin, aTopLevelOrigin, aInPBMode, Move(updates));
   }
-  class Updates : public nsRunnable
+  class Updates : public Runnable
   {
   public:
     Updates(GMPStorageTest* aRunner, nsTArray<nsCString>&& aUpdates)
       : mRunner(aRunner),
         mUpdates(aUpdates)
     {
     }
 
--- a/dom/media/gtest/TestMP4Demuxer.cpp
+++ b/dom/media/gtest/TestMP4Demuxer.cpp
@@ -142,17 +142,17 @@ public:
   }
 
 private:
 
   template<typename FunctionType>
   void
   DispatchTask(FunctionType aFun)
   {
-    RefPtr<nsRunnable> r = NS_NewRunnableFunction(aFun);
+    RefPtr<Runnable> r = NS_NewRunnableFunction(aFun);
     mTaskQueue->Dispatch(r.forget());
   }
 
   virtual ~MP4DemuxerBinding()
   {
   }
 };
 
--- a/dom/media/gtest/TestMediaFormatReader.cpp
+++ b/dom/media/gtest/TestMediaFormatReader.cpp
@@ -123,17 +123,17 @@ public:
              [self]() {
                EXPECT_TRUE(false);
                self->mTaskQueue->BeginShutdown();
              }); //Then
   }
   template<class Function>
   void RunTestAndWait(Function&& aFunction)
   {
-    RefPtr<nsRunnable> r = NS_NewRunnableFunction(Forward<Function>(aFunction));
+    RefPtr<Runnable> r = NS_NewRunnableFunction(Forward<Function>(aFunction));
     mTaskQueue->Dispatch(r.forget());
     mTaskQueue->AwaitShutdownAndIdle();
   }
 private:
   ~MediaFormatReaderBinding()
   {}
 };
 
--- a/dom/media/gtest/TestMozPromise.cpp
+++ b/dom/media/gtest/TestMozPromise.cpp
@@ -29,17 +29,17 @@ public:
     mTaskQueue->AwaitShutdownAndIdle();
   }
 
   TaskQueue* Queue() { return mTaskQueue; }
 private:
   RefPtr<TaskQueue> mTaskQueue;
 };
 
-class DelayedResolveOrReject : public nsRunnable
+class DelayedResolveOrReject : public Runnable
 {
 public:
   DelayedResolveOrReject(TaskQueue* aTaskQueue,
                          TestPromise::Private* aPromise,
                          TestPromise::ResolveOrRejectValue aValue,
                          int aIterations)
   : mTaskQueue(aTaskQueue)
   , mPromise(aPromise)
--- a/dom/media/imagecapture/CaptureTask.cpp
+++ b/dom/media/imagecapture/CaptureTask.cpp
@@ -150,17 +150,17 @@ CaptureTask::NotifyEnded()
 }
 
 void
 CaptureTask::PostTrackEndEvent()
 {
   mImageGrabbedOrTrackEnd = true;
 
   // Got track end or finish event, stop the task.
-  class TrackEndRunnable : public nsRunnable
+  class TrackEndRunnable : public Runnable
   {
   public:
     explicit TrackEndRunnable(CaptureTask* aTask)
       : mTask(aTask) {}
 
     NS_IMETHOD Run()
     {
       mTask->TaskComplete(nullptr, NS_ERROR_FAILURE);
--- a/dom/media/mediasink/DecodedStream.cpp
+++ b/dom/media/mediasink/DecodedStream.cpp
@@ -265,17 +265,17 @@ DecodedStream::Start(int64_t aStartTime,
   AssertOwnerThread();
   MOZ_ASSERT(mStartTime.isNothing(), "playback already started.");
 
   mStartTime.emplace(aStartTime);
   mInfo = aInfo;
   mPlaying = true;
   ConnectListener();
 
-  class R : public nsRunnable {
+  class R : public Runnable {
     typedef MozPromiseHolder<GenericPromise> Promise;
   public:
     R(PlaybackInfoInit&& aInit, Promise&& aPromise, OutputStreamManager* aManager)
       : mInit(Move(aInit)), mOutputStreamManager(aManager)
     {
       mPromise = Move(aPromise);
     }
     NS_IMETHOD Run() override
--- a/dom/media/mediasource/AsyncEventRunner.h
+++ b/dom/media/mediasource/AsyncEventRunner.h
@@ -7,17 +7,17 @@
 #ifndef MOZILLA_ASYNCEVENTRUNNER_H_
 #define MOZILLA_ASYNCEVENTRUNNER_H_
 
 #include "nsThreadUtils.h"
 
 namespace mozilla {
 
 template <typename T>
-class AsyncEventRunner : public nsRunnable
+class AsyncEventRunner : public Runnable
 {
 public:
   AsyncEventRunner(T* aTarget, const char* aName)
     : mTarget(aTarget)
     , mName(aName)
   {}
 
   NS_IMETHOD Run() override
--- a/dom/media/mediasource/TrackBuffersManager.cpp
+++ b/dom/media/mediasource/TrackBuffersManager.cpp
@@ -54,17 +54,17 @@ AppendStateToStr(SourceBufferAttributes:
     default:
       return "IMPOSSIBLE";
   }
 }
 
 static Atomic<uint32_t> sStreamSourceID(0u);
 
 #ifdef MOZ_EME
-class DispatchKeyNeededEvent : public nsRunnable {
+class DispatchKeyNeededEvent : public Runnable {
 public:
   DispatchKeyNeededEvent(AbstractMediaDecoder* aDecoder,
                          nsTArray<uint8_t>& aInitData,
                          const nsString& aInitDataType)
     : mDecoder(aDecoder)
     , mInitData(aInitData)
     , mInitDataType(aInitDataType)
   {
--- a/dom/media/omx/MediaOmxReader.cpp
+++ b/dom/media/omx/MediaOmxReader.cpp
@@ -61,17 +61,17 @@ private:
 // thread, an instance of this class is scheduled to the main thread for
 // parsing the MP3 stream. The decode thread waits until it has finished.
 //
 // If there is more data available from the file, the runnable dispatches
 // a task to the IO thread for retrieving the next chunk of data, and
 // the IO task dispatches a runnable to the main thread for parsing the
 // data. This goes on until all of the MP3 file has been parsed.
 
-class MediaOmxReader::NotifyDataArrivedRunnable : public nsRunnable
+class MediaOmxReader::NotifyDataArrivedRunnable : public Runnable
 {
 public:
   NotifyDataArrivedRunnable(MediaOmxReader* aOmxReader,
                             uint64_t aLength,
                             int64_t aOffset, uint64_t aFullLength)
   : mOmxReader(aOmxReader),
     mLength(aLength),
     mOffset(aOffset),
--- a/dom/media/platforms/agnostic/BlankDecoderModule.cpp
+++ b/dom/media/platforms/agnostic/BlankDecoderModule.cpp
@@ -38,17 +38,17 @@ public:
   RefPtr<InitPromise> Init() override {
     return InitPromise::CreateAndResolve(mType, __func__);
   }
 
   nsresult Shutdown() override {
     return NS_OK;
   }
 
-  class OutputEvent : public nsRunnable {
+  class OutputEvent : public Runnable {
   public:
     OutputEvent(MediaRawData* aSample,
                 MediaDataDecoderCallback* aCallback,
                 BlankMediaDataCreator* aCreator)
       : mSample(aSample)
       , mCreator(aCreator)
       , mCallback(aCallback)
     {
--- a/dom/media/platforms/agnostic/gmp/MediaDataDecoderProxy.h
+++ b/dom/media/platforms/agnostic/gmp/MediaDataDecoderProxy.h
@@ -10,17 +10,17 @@
 #include "PlatformDecoderModule.h"
 #include "mozilla/RefPtr.h"
 #include "nsThreadUtils.h"
 #include "nscore.h"
 #include "GMPService.h"
 
 namespace mozilla {
 
-class InputTask : public nsRunnable {
+class InputTask : public Runnable {
 public:
   InputTask(MediaDataDecoder* aDecoder,
             MediaRawData* aSample)
    : mDecoder(aDecoder)
    , mSample(aSample)
   {}
 
   NS_IMETHOD Run() {
--- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
+++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
@@ -144,17 +144,17 @@ WMFVideoMFTManager::GetMediaSubtypeGUID(
   switch (mStreamType) {
     case H264: return MFVideoFormat_H264;
     case VP8: return MFVideoFormat_VP80;
     case VP9: return MFVideoFormat_VP90;
     default: return GUID_NULL;
   };
 }
 
-class CreateDXVAManagerEvent : public nsRunnable {
+class CreateDXVAManagerEvent : public Runnable {
 public:
   CreateDXVAManagerEvent(LayersBackend aBackend, nsCString& aFailureReason)
     : mBackend(aBackend)
     , mFailureReason(aFailureReason)
   {}
 
   NS_IMETHOD Run() {
     NS_ASSERTION(NS_IsMainThread(), "Must be on main thread.");
--- a/dom/media/systemservices/CamerasChild.cpp
+++ b/dom/media/systemservices/CamerasChild.cpp
@@ -35,17 +35,17 @@ CamerasSingleton::CamerasSingleton()
     mCamerasChildThread(nullptr) {
   LOG(("CamerasSingleton: %p", this));
 }
 
 CamerasSingleton::~CamerasSingleton() {
   LOG(("~CamerasSingleton: %p", this));
 }
 
-class InitializeIPCThread : public nsRunnable
+class InitializeIPCThread : public Runnable
 {
 public:
   InitializeIPCThread()
     : mCamerasChild(nullptr) {}
 
   NS_IMETHOD Run() override {
     // Try to get the PBackground handle
     ipc::PBackgroundChild* existingBackgroundChild =
@@ -479,34 +479,34 @@ Shutdown(void)
     // We don't want to cause everything to get fired up if we're
     // really already shut down.
     LOG(("Shutdown when already shut down"));
     return;
   }
   child->ShutdownAll();
 }
 
-class ShutdownRunnable : public nsRunnable {
+class ShutdownRunnable : public Runnable {
 public:
-  ShutdownRunnable(RefPtr<nsRunnable> aReplyEvent,
+  ShutdownRunnable(RefPtr<Runnable> aReplyEvent,
                    nsIThread* aReplyThread)
     : mReplyEvent(aReplyEvent), mReplyThread(aReplyThread) {};
 
   NS_IMETHOD Run() override {
     LOG(("Closing BackgroundChild"));
     ipc::BackgroundChild::CloseForCurrentThread();
 
     LOG(("PBackground thread exists, shutting down thread"));
     mReplyThread->Dispatch(mReplyEvent, NS_DISPATCH_NORMAL);
 
     return NS_OK;
   }
 
 private:
-  RefPtr<nsRunnable> mReplyEvent;
+  RefPtr<Runnable> mReplyEvent;
   nsIThread* mReplyThread;
 };
 
 void
 CamerasChild::ShutdownAll()
 {
   // Called with CamerasSingleton::Mutex() held
   ShutdownParent();
@@ -520,17 +520,17 @@ CamerasChild::ShutdownParent()
   {
     MonitorAutoLock monitor(mReplyMonitor);
     mIPCIsAlive = false;
     monitor.NotifyAll();
   }
   if (CamerasSingleton::Thread()) {
     LOG(("Dispatching actor deletion"));
     // Delete the parent actor.
-    RefPtr<nsRunnable> deleteRunnable =
+    RefPtr<Runnable> deleteRunnable =
       // CamerasChild (this) will remain alive and is only deleted by the
       // IPC layer when SendAllDone returns.
       media::NewRunnableFrom([this]() -> nsresult {
         Unused << this->SendAllDone();
         return NS_OK;
       });
     CamerasSingleton::Thread()->Dispatch(deleteRunnable, NS_DISPATCH_NORMAL);
   } else {
@@ -541,17 +541,17 @@ CamerasChild::ShutdownParent()
 void
 CamerasChild::ShutdownChild()
 {
   // Called with CamerasSingleton::Mutex() held
   if (CamerasSingleton::Thread()) {
     LOG(("PBackground thread exists, dispatching close"));
     // Dispatch closing the IPC thread back to us when the
     // BackgroundChild is closed.
-    RefPtr<nsRunnable> event =
+    RefPtr<Runnable> event =
       new ThreadDestructor(CamerasSingleton::Thread());
     RefPtr<ShutdownRunnable> runnable =
       new ShutdownRunnable(event, NS_GetCurrentThread());
     CamerasSingleton::Thread()->Dispatch(runnable, NS_DISPATCH_NORMAL);
   } else {
     LOG(("Shutdown called without PBackground thread"));
   }
   LOG(("Erasing sCameras & thread refs (original thread)"));
--- a/dom/media/systemservices/CamerasParent.cpp
+++ b/dom/media/systemservices/CamerasParent.cpp
@@ -35,17 +35,17 @@ namespace camera {
 // - the main thread for some setups, and occassionally for video capture setup
 //   calls that don't work correctly elsewhere.
 // - the IPC thread on which PBackground is running and which receives and
 //   sends messages
 // - a thread which will execute the actual (possibly slow) camera access
 //   called "VideoCapture". On Windows this is a thread with an event loop
 //   suitable for UI access.
 
-class FrameSizeChangeRunnable : public nsRunnable {
+class FrameSizeChangeRunnable : public Runnable {
 public:
   FrameSizeChangeRunnable(CamerasParent *aParent, CaptureEngine capEngine,
                           int cap_id, unsigned int aWidth, unsigned int aHeight)
     : mParent(aParent), mCapEngine(capEngine), mCapId(cap_id),
       mWidth(aWidth), mHeight(aHeight) {}
 
   NS_IMETHOD Run() {
     if (mParent->IsShuttingDown()) {
@@ -84,17 +84,17 @@ CallbackHelper::FrameSizeChange(unsigned
     new FrameSizeChangeRunnable(mParent, mCapEngine, mCapturerId, w, h);
   MOZ_ASSERT(mParent);
   nsIThread * thread = mParent->GetBackgroundThread();
   MOZ_ASSERT(thread != nullptr);
   thread->Dispatch(runnable, NS_DISPATCH_NORMAL);
   return 0;
 }
 
-class DeliverFrameRunnable : public nsRunnable {
+class DeliverFrameRunnable : public Runnable {
 public:
   DeliverFrameRunnable(CamerasParent *aParent,
                        CaptureEngine engine,
                        int cap_id,
                        ShmemBuffer buffer,
                        unsigned char* altbuffer,
                        size_t size,
                        uint32_t time_stamp,
@@ -160,17 +160,17 @@ CamerasParent::Observe(nsISupports *aSub
   nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
   MOZ_ASSERT(obs);
   obs->RemoveObserver(this, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID);
   StopVideoCapture();
   return NS_OK;
 }
 
 nsresult
-CamerasParent::DispatchToVideoCaptureThread(nsRunnable *event)
+CamerasParent::DispatchToVideoCaptureThread(Runnable *event)
 {
   // Don't try to dispatch if we're already on the right thread.
   // There's a potential deadlock because the mThreadMonitor is likely
   // to be taken already.
   MOZ_ASSERT(!mVideoCaptureThread ||
              mVideoCaptureThread->thread_id() != PlatformThread::CurrentId());
 
   MonitorAutoLock lock(mThreadMonitor);
@@ -190,17 +190,17 @@ CamerasParent::DispatchToVideoCaptureThr
 void
 CamerasParent::StopVideoCapture()
 {
   LOG((__PRETTY_FUNCTION__));
   // We are called from the main thread (xpcom-shutdown) or
   // from PBackground (when the Actor shuts down).
   // Shut down the WebRTC stack (on the capture thread)
   RefPtr<CamerasParent> self(this);
-  RefPtr<nsRunnable> webrtc_runnable =
+  RefPtr<Runnable> webrtc_runnable =
     media::NewRunnableFrom([self]() -> nsresult {
       MonitorAutoLock lock(self->mThreadMonitor);
       self->CloseEngines();
       self->mThreadMonitor.NotifyAll();
       return NS_OK;
     });
   DebugOnly<nsresult> rv = DispatchToVideoCaptureThread(webrtc_runnable);
 #ifdef DEBUG
@@ -215,17 +215,17 @@ CamerasParent::StopVideoCapture()
   while (mWebRTCAlive) {
     mThreadMonitor.Wait();
   }
   // After closing the WebRTC stack, clean up the
   // VideoCapture thread.
   if (self->mVideoCaptureThread) {
     base::Thread *thread = self->mVideoCaptureThread;
     self->mVideoCaptureThread = nullptr;
-    RefPtr<nsRunnable> threadShutdown =
+    RefPtr<Runnable> threadShutdown =
       media::NewRunnableFrom([thread]() -> nsresult {
         if (thread->IsRunning()) {
           thread->Stop();
         }
         delete thread;
         return NS_OK;
       });
     if (NS_FAILED(NS_DispatchToMainThread(threadShutdown))) {
@@ -476,17 +476,17 @@ CamerasParent::EnsureInitialized(int aEn
 // It would be nice to get rid of the code duplication here,
 // perhaps via Promises.
 bool
 CamerasParent::RecvNumberOfCaptureDevices(const int& aCapEngine)
 {
   LOG((__PRETTY_FUNCTION__));
 
   RefPtr<CamerasParent> self(this);
-  RefPtr<nsRunnable> webrtc_runnable =
+  RefPtr<Runnable> webrtc_runnable =
     media::NewRunnableFrom([self, aCapEngine]() -> nsresult {
       int num = -1;
       if (self->EnsureInitialized(aCapEngine)) {
         num = self->mEngines[aCapEngine].mPtrViECapture->NumberOfCaptureDevices();
       }
       RefPtr<nsIRunnable> ipc_runnable =
         media::NewRunnableFrom([self, num]() -> nsresult {
           if (self->IsShuttingDown()) {
@@ -512,17 +512,17 @@ CamerasParent::RecvNumberOfCaptureDevice
 bool
 CamerasParent::RecvNumberOfCapabilities(const int& aCapEngine,
                                         const nsCString& unique_id)
 {
   LOG((__PRETTY_FUNCTION__));
   LOG(("Getting caps for %s", unique_id.get()));
 
   RefPtr<CamerasParent> self(this);
-  RefPtr<nsRunnable> webrtc_runnable =
+  RefPtr<Runnable> webrtc_runnable =
     media::NewRunnableFrom([self, unique_id, aCapEngine]() -> nsresult {
       int num = -1;
       if (self->EnsureInitialized(aCapEngine)) {
         num =
           self->mEngines[aCapEngine].mPtrViECapture->NumberOfCapabilities(
             unique_id.get(),
             MediaEngineSource::kMaxUniqueIdLength);
       }
@@ -552,17 +552,17 @@ bool
 CamerasParent::RecvGetCaptureCapability(const int &aCapEngine,
                                         const nsCString& unique_id,
                                         const int& num)
 {
   LOG((__PRETTY_FUNCTION__));
   LOG(("RecvGetCaptureCapability: %s %d", unique_id.get(), num));
 
   RefPtr<CamerasParent> self(this);
-  RefPtr<nsRunnable> webrtc_runnable =
+  RefPtr<Runnable> webrtc_runnable =
     media::NewRunnableFrom([self, unique_id, aCapEngine, num]() -> nsresult {
       webrtc::CaptureCapability webrtcCaps;
       int error = -1;
       if (self->EnsureInitialized(aCapEngine)) {
         error = self->mEngines[aCapEngine].mPtrViECapture->GetCaptureCapability(
           unique_id.get(), MediaEngineSource::kMaxUniqueIdLength, num, webrtcCaps);
       }
       RefPtr<nsIRunnable> ipc_runnable =
@@ -600,17 +600,17 @@ CamerasParent::RecvGetCaptureCapability(
 
 bool
 CamerasParent::RecvGetCaptureDevice(const int& aCapEngine,
                                     const int& aListNumber)
 {
   LOG((__PRETTY_FUNCTION__));
 
   RefPtr<CamerasParent> self(this);
-  RefPtr<nsRunnable> webrtc_runnable =
+  RefPtr<Runnable> webrtc_runnable =
     media::NewRunnableFrom([self, aCapEngine, aListNumber]() -> nsresult {
       char deviceName[MediaEngineSource::kMaxDeviceNameLength];
       char deviceUniqueId[MediaEngineSource::kMaxUniqueIdLength];
       nsCString name;
       nsCString uniqueId;
       int error = -1;
       if (self->EnsureInitialized(aCapEngine)) {
           error = self->mEngines[aCapEngine].mPtrViECapture->GetCaptureDevice(aListNumber,
@@ -714,17 +714,17 @@ HasCameraPermission(const nsCString& aOr
 
 bool
 CamerasParent::RecvAllocateCaptureDevice(const int& aCapEngine,
                                          const nsCString& unique_id,
                                          const nsCString& aOrigin)
 {
   LOG(("%s: Verifying permissions for %s", __PRETTY_FUNCTION__, aOrigin.get()));
   RefPtr<CamerasParent> self(this);
-  RefPtr<nsRunnable> mainthread_runnable =
+  RefPtr<Runnable> mainthread_runnable =
     media::NewRunnableFrom([self, aCapEngine, unique_id, aOrigin]() -> nsresult {
       // Verify whether the claimed origin has received permission
       // to use the camera, either persistently or this session (one shot).
       bool allowed = HasCameraPermission(aOrigin);
       if (!allowed) {
         // Developer preference for turning off permission check.
         if (Preferences::GetBool("media.navigator.permission.disabled", false)
             || Preferences::GetBool("media.navigator.permission.fake")) {
@@ -732,17 +732,17 @@ CamerasParent::RecvAllocateCaptureDevice
           LOG(("No permission but checks are disabled or fake sources active"));
         } else {
           LOG(("No camera permission for this origin"));
         }
       }
       // After retrieving the permission (or not) on the main thread,
       // bounce to the WebRTC thread to allocate the device (or not),
       // then bounce back to the IPC thread for the reply to content.
-      RefPtr<nsRunnable> webrtc_runnable =
+      RefPtr<Runnable> webrtc_runnable =
       media::NewRunnableFrom([self, allowed, aCapEngine, unique_id]() -> nsresult {
         int numdev = -1;
         int error = -1;
         if (allowed && self->EnsureInitialized(aCapEngine)) {
           error = self->mEngines[aCapEngine].mPtrViECapture->AllocateCaptureDevice(
                     unique_id.get(), MediaEngineSource::kMaxUniqueIdLength, numdev);
         }
         RefPtr<nsIRunnable> ipc_runnable =
@@ -783,17 +783,17 @@ CamerasParent::ReleaseCaptureDevice(cons
 bool
 CamerasParent::RecvReleaseCaptureDevice(const int& aCapEngine,
                                         const int& numdev)
 {
   LOG((__PRETTY_FUNCTION__));
   LOG(("RecvReleaseCamera device nr %d", numdev));
 
   RefPtr<CamerasParent> self(this);
-  RefPtr<nsRunnable> webrtc_runnable =
+  RefPtr<Runnable> webrtc_runnable =
     media::NewRunnableFrom([self, aCapEngine, numdev]() -> nsresult {
       int error = self->ReleaseCaptureDevice(aCapEngine, numdev);
       RefPtr<nsIRunnable> ipc_runnable =
         media::NewRunnableFrom([self, error, numdev]() -> nsresult {
           if (self->IsShuttingDown()) {
             LOG(("In Shutdown, not Releasing"));
             return NS_ERROR_FAILURE;
           }
@@ -817,17 +817,17 @@ CamerasParent::RecvReleaseCaptureDevice(
 bool
 CamerasParent::RecvStartCapture(const int& aCapEngine,
                                 const int& capnum,
                                 const CaptureCapability& ipcCaps)
 {
   LOG((__PRETTY_FUNCTION__));
 
   RefPtr<CamerasParent> self(this);
-  RefPtr<nsRunnable> webrtc_runnable =
+  RefPtr<Runnable> webrtc_runnable =
     media::NewRunnableFrom([self, aCapEngine, capnum, ipcCaps]() -> nsresult {
       CallbackHelper** cbh;
       webrtc::ExternalRenderer* render;
       EngineHelper* helper = nullptr;
       int error = -1;
       if (self->EnsureInitialized(aCapEngine)) {
         cbh = self->mCallbacks.AppendElement(
           new CallbackHelper(static_cast<CaptureEngine>(aCapEngine), capnum, self));
@@ -899,17 +899,17 @@ CamerasParent::StopCapture(const int& aC
 
 bool
 CamerasParent::RecvStopCapture(const int& aCapEngine,
                                const int& capnum)
 {
   LOG((__PRETTY_FUNCTION__));
 
   RefPtr<CamerasParent> self(this);
-  RefPtr<nsRunnable> webrtc_runnable =
+  RefPtr<Runnable> webrtc_runnable =
     media::NewRunnableFrom([self, aCapEngine, capnum]() -> nsresult {
       self->StopCapture(aCapEngine, capnum);
       return NS_OK;
     });
   nsresult rv = DispatchToVideoCaptureThread(webrtc_runnable);
   if (self->IsShuttingDown()) {
     return NS_SUCCEEDED(rv);
   } else {
@@ -964,17 +964,17 @@ CamerasParent::CamerasParent()
   LOG(("CamerasParent: %p", this));
 
   mPBackgroundThread = NS_GetCurrentThread();
   MOZ_ASSERT(mPBackgroundThread != nullptr, "GetCurrentThread failed");
 
   LOG(("Spinning up WebRTC Cameras Thread"));
 
   RefPtr<CamerasParent> self(this);
-  RefPtr<nsRunnable> threadStart =
+  RefPtr<Runnable> threadStart =
     media::NewRunnableFrom([self]() -> nsresult {
       // Register thread shutdown observer
       nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
       if (NS_WARN_IF(!obs)) {
         return NS_ERROR_FAILURE;
       }
       nsresult rv =
         obs->AddObserver(self, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID, false);
--- a/dom/media/systemservices/CamerasParent.h
+++ b/dom/media/systemservices/CamerasParent.h
@@ -124,17 +124,17 @@ protected:
   void StopCapture(const int& aCapEngine, const int& capnum);
   int ReleaseCaptureDevice(const int& aCapEngine, const int& capnum);
 
   bool SetupEngine(CaptureEngine aCapEngine);
   bool EnsureInitialized(int aEngine);
   void CloseEngines();
   void StopIPC();
   void StopVideoCapture();
-  nsresult DispatchToVideoCaptureThread(nsRunnable *event);
+  nsresult DispatchToVideoCaptureThread(Runnable *event);
 
   EngineHelper mEngines[CaptureEngine::MaxEngine];
   nsTArray<CallbackHelper*> mCallbacks;
 
   // image buffers
   mozilla::ShmemPool mShmemPool;
 
   // PBackground parent thread
--- a/dom/media/systemservices/CamerasUtils.h
+++ b/dom/media/systemservices/CamerasUtils.h
@@ -13,17 +13,17 @@
 
 #include "base/thread.h"
 
 namespace mozilla {
 namespace camera {
 
 nsresult SynchronouslyCreatePBackground();
 
-class ThreadDestructor : public nsRunnable
+class ThreadDestructor : public Runnable
 {
   DISALLOW_COPY_AND_ASSIGN(ThreadDestructor);
 
 public:
   explicit ThreadDestructor(nsIThread* aThread)
     : mThread(aThread) {}
 
   NS_IMETHOD Run() override
@@ -37,24 +37,24 @@ public:
 private:
   ~ThreadDestructor() {}
   nsCOMPtr<nsIThread> mThread;
 };
 
 class RunnableTask : public Task
 {
 public:
-  explicit RunnableTask(nsRunnable* aRunnable)
+  explicit RunnableTask(Runnable* aRunnable)
     : mRunnable(aRunnable) {}
 
   void Run() override {
     mRunnable->Run();
   }
 
 private:
   ~RunnableTask() {}
-  RefPtr<nsRunnable> mRunnable;
+  RefPtr<Runnable> mRunnable;
 };
 
 }
 }
 
 #endif // mozilla_CameraUtils_h
--- a/dom/media/systemservices/LoadMonitor.cpp
+++ b/dom/media/systemservices/LoadMonitor.cpp
@@ -89,17 +89,17 @@ LoadMonitor::Observe(nsISupports* /* aSu
                      const char16_t* /* aData */)
 {
   MOZ_ASSERT(NS_IsMainThread(), "Wrong thread!");
   MOZ_ASSERT(!strcmp("xpcom-shutdown-threads", aTopic), "Bad topic!");
   Shutdown();
   return NS_OK;
 }
 
-class LoadMonitorAddObserver : public nsRunnable
+class LoadMonitorAddObserver : public Runnable
 {
 public:
   explicit LoadMonitorAddObserver(RefPtr<LoadMonitor> loadMonitor)
   {
     mLoadMonitor = loadMonitor;
   }
 
   NS_IMETHOD Run()
@@ -114,17 +114,17 @@ public:
 
     return NS_OK;
   }
 
 private:
   RefPtr<LoadMonitor> mLoadMonitor;
 };
 
-class LoadMonitorRemoveObserver : public nsRunnable
+class LoadMonitorRemoveObserver : public Runnable
 {
 public:
   explicit LoadMonitorRemoveObserver(RefPtr<LoadMonitor> loadMonitor)
   {
     mLoadMonitor = loadMonitor;
   }
 
   NS_IMETHOD Run()
@@ -527,17 +527,17 @@ nsresult RTCLoadInfo::UpdateProcessLoad(
                 cpu_times,
                 &mProcessLoad);
 #endif
   return NS_OK;
 }
 
 // Note: This class can't be in the anonymous namespace, because then we can't
 // declare it as a friend of LoadMonitor.
-class LoadInfoCollectRunner : public nsRunnable
+class LoadInfoCollectRunner : public Runnable
 {
 public:
   LoadInfoCollectRunner(RefPtr<LoadMonitor> loadMonitor,
                         RefPtr<RTCLoadInfo> loadInfo,
                         nsIThread *loadInfoThread)
     : mThread(loadInfoThread),
       mLoadUpdateInterval(loadMonitor->mLoadUpdateInterval),
       mLoadNoiseCounter(0)
--- a/dom/media/systemservices/MediaUtils.h
+++ b/dom/media/systemservices/MediaUtils.h
@@ -141,24 +141,24 @@ protected:
 private:
   ~Pledge() {};
   bool mDone;
   bool mRejected;
   ErrorType mError;
   UniquePtr<FunctorsBase> mFunctors;
 };
 
-/* media::NewRunnableFrom() - Create an nsRunnable from a lambda.
+/* media::NewRunnableFrom() - Create a Runnable from a lambda.
  * media::NewTaskFrom()     - Create a Task from a lambda.
  *
- * Passing variables (closures) to an async function is clunky with nsRunnable:
+ * Passing variables (closures) to an async function is clunky with Runnable:
  *
  *   void Foo()
  *   {
- *     class FooRunnable : public nsRunnable
+ *     class FooRunnable : public Runnable
  *     {
  *     public:
  *       FooRunnable(const Bar &aBar) : mBar(aBar) {}
  *       NS_IMETHOD Run()
  *       {
  *         // Use mBar
  *       }
  *     private:
@@ -181,17 +181,17 @@ private:
  *
  * Capture is by-copy by default, so the nsRefPtr 'bar' is safely copied for
  * access on the other thread (threadsafe refcounting in bar is assumed).
  *
  * The 'mutable' keyword is only needed for non-const access to bar.
  */
 
 template<typename OnRunType>
-class LambdaRunnable : public nsRunnable
+class LambdaRunnable : public Runnable
 {
 public:
   explicit LambdaRunnable(OnRunType&& aOnRun) : mOnRun(Move(aOnRun)) {}
 private:
   NS_IMETHODIMP
   Run()
   {
     return mOnRun();
--- a/dom/media/webaudio/AnalyserNode.cpp
+++ b/dom/media/webaudio/AnalyserNode.cpp
@@ -21,17 +21,17 @@ static_assert((CHUNK_COUNT & (CHUNK_COUN
               "CHUNK_COUNT must be power of 2 for remainder behavior");
 
 namespace dom {
 
 NS_IMPL_ISUPPORTS_INHERITED0(AnalyserNode, AudioNode)
 
 class AnalyserNodeEngine final : public AudioNodeEngine
 {
-  class TransferBuffer final : public nsRunnable
+  class TransferBuffer final : public Runnable
   {
   public:
     TransferBuffer(AudioNodeStream* aStream,
                    const AudioChunk& aChunk)
       : mStream(aStream)
       , mChunk(aChunk)
     {
     }
--- a/dom/media/webaudio/AudioBufferSourceNode.cpp
+++ b/dom/media/webaudio/AudioBufferSourceNode.cpp
@@ -767,17 +767,17 @@ AudioBufferSourceNode::Stop(double aWhen
   ns->SetStreamTimeParameter(STOP, Context(), std::max(0.0, aWhen));
 }
 
 void
 AudioBufferSourceNode::NotifyMainThreadStreamFinished()
 {
   MOZ_ASSERT(mStream->IsFinished());
 
-  class EndedEventDispatcher final : public nsRunnable
+  class EndedEventDispatcher final : public Runnable
   {
   public:
     explicit EndedEventDispatcher(AudioBufferSourceNode* aNode)
       : mNode(aNode) {}
     NS_IMETHODIMP Run() override
     {
       // If it's not safe to run scripts right now, schedule this to run later
       if (!nsContentUtils::IsSafeToRunScript()) {
--- a/dom/media/webaudio/AudioContext.cpp
+++ b/dom/media/webaudio/AudioContext.cpp
@@ -752,17 +752,17 @@ StateChangeTask::Run()
   // We have can't call Release() on the AudioContext on the MSG thread, so we
   // unref it here, on the main thread.
   mAudioContext = nullptr;
 
   return NS_OK;
 }
 
 /* This runnable allows to fire the "statechange" event */
-class OnStateChangeTask final : public nsRunnable
+class OnStateChangeTask final : public Runnable
 {
 public:
   explicit OnStateChangeTask(AudioContext* aAudioContext)
     : mAudioContext(aAudioContext)
   {}
 
   NS_IMETHODIMP
   Run() override
--- a/dom/media/webaudio/AudioContext.h
+++ b/dom/media/webaudio/AudioContext.h
@@ -86,17 +86,17 @@ private:
   RefPtr<WebCore::PeriodicWave> mSquare;
   RefPtr<WebCore::PeriodicWave> mTriangle;
   uint32_t mSampleRate;
 };
 
 
 /* This runnable allows the MSG to notify the main thread when audio is actually
  * flowing */
-class StateChangeTask final : public nsRunnable
+class StateChangeTask final : public Runnable
 {
 public:
   /* This constructor should be used when this event is sent from the main
    * thread. */
   StateChangeTask(AudioContext* aAudioContext, void* aPromise, AudioContextState aNewState);
 
   /* This constructor should be used when this event is sent from the audio
    * thread. */
--- a/dom/media/webaudio/AudioDestinationNode.cpp
+++ b/dom/media/webaudio/AudioDestinationNode.cpp
@@ -117,17 +117,17 @@ public:
   bool IsActive() const override
   {
     // Keep processing to track stream time, which is used for all timelines
     // associated with the same AudioContext.
     return true;
   }
 
 
-  class OnCompleteTask final : public nsRunnable
+  class OnCompleteTask final : public Runnable
   {
   public:
     OnCompleteTask(AudioContext* aAudioContext, AudioBuffer* aRenderedBuffer)
       : mAudioContext(aAudioContext)
       , mRenderedBuffer(aRenderedBuffer)
     {}
 
     NS_IMETHOD Run() override
@@ -193,17 +193,17 @@ private:
   uint32_t mWriteIndex;
   uint32_t mNumberOfChannels;
   // How many frames the OfflineAudioContext intends to produce.
   uint32_t mLength;
   float mSampleRate;
   bool mBufferAllocated;
 };
 
-class InputMutedRunnable final : public nsRunnable
+class InputMutedRunnable final : public Runnable
 {
 public:
   InputMutedRunnable(AudioNodeStream* aStream,
                      bool aInputMuted)
     : mStream(aStream)
     , mInputMuted(aInputMuted)
   {
   }
--- a/dom/media/webaudio/AudioNode.cpp
+++ b/dom/media/webaudio/AudioNode.cpp
@@ -302,17 +302,17 @@ AudioNode::Disconnect(uint32_t aOutput, 
   WEB_AUDIO_API_LOG("%f: %s %u Disconnect()", Context()->CurrentTime(),
                     NodeType(), Id());
 
   // An upstream node may be starting to play on the graph thread, and the
   // engine for a downstream node may be sending a PlayingRefChangeHandler
   // ADDREF message to this (main) thread.  Wait for a round trip before
   // releasing nodes, to give engines receiving sound now time to keep their
   // nodes alive.
-  class RunnableRelease final : public nsRunnable
+  class RunnableRelease final : public Runnable
   {
   public:
     explicit RunnableRelease(already_AddRefed<AudioNode> aNode)
       : mNode(aNode) {}
 
     NS_IMETHODIMP Run() override
     {
       mNode = nullptr;
--- a/dom/media/webaudio/DynamicsCompressorNode.cpp
+++ b/dom/media/webaudio/DynamicsCompressorNode.cpp
@@ -138,17 +138,17 @@ public:
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 
 private:
   void SendReductionParamToMainThread(AudioNodeStream* aStream, float aReduction)
   {
     MOZ_ASSERT(!NS_IsMainThread());
 
-    class Command final : public nsRunnable
+    class Command final : public Runnable
     {
     public:
       Command(AudioNodeStream* aStream, float aReduction)
         : mStream(aStream)
         , mReduction(aReduction)
       {
       }
 
--- a/dom/media/webaudio/MediaBufferDecoder.cpp
+++ b/dom/media/webaudio/MediaBufferDecoder.cpp
@@ -50,17 +50,17 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(WebAudioDecodeJob)
 NS_IMPL_CYCLE_COLLECTION_TRACE_END
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(WebAudioDecodeJob, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(WebAudioDecodeJob, Release)
 
 using namespace dom;
 
-class ReportResultTask final : public nsRunnable
+class ReportResultTask final : public Runnable
 {
 public:
   ReportResultTask(WebAudioDecodeJob& aDecodeJob,
                    WebAudioDecodeJob::ResultFn aFunction,
                    WebAudioDecodeJob::ErrorCode aErrorCode)
     : mDecodeJob(aDecodeJob)
     , mFunction(aFunction)
     , mErrorCode(aErrorCode)
@@ -89,17 +89,17 @@ private:
 
 enum class PhaseEnum : int
 {
   Decode,
   AllocateBuffer,
   Done
 };
 
-class MediaDecodeTask final : public nsRunnable
+class MediaDecodeTask final : public Runnable
 {
 public:
   MediaDecodeTask(const char* aContentType, uint8_t* aBuffer,
                   uint32_t aLength,
                   WebAudioDecodeJob& aDecodeJob)
     : mContentType(aContentType)
     , mBuffer(aBuffer)
     , mLength(aLength)
--- a/dom/media/webaudio/OscillatorNode.cpp
+++ b/dom/media/webaudio/OscillatorNode.cpp
@@ -528,17 +528,17 @@ OscillatorNode::Stop(double aWhen, Error
                                   Context(), std::max(0.0, aWhen));
 }
 
 void
 OscillatorNode::NotifyMainThreadStreamFinished()
 {
   MOZ_ASSERT(mStream->IsFinished());
 
-  class EndedEventDispatcher final : public nsRunnable
+  class EndedEventDispatcher final : public Runnable
   {
   public:
     explicit EndedEventDispatcher(OscillatorNode* aNode)
       : mNode(aNode) {}
     NS_IMETHOD Run() override
     {
       // If it's not safe to run scripts right now, schedule this to run later
       if (!nsContentUtils::IsSafeToRunScript()) {
--- a/dom/media/webaudio/PlayingRefChangeHandler.h
+++ b/dom/media/webaudio/PlayingRefChangeHandler.h
@@ -8,17 +8,17 @@
 #define PlayingRefChangeHandler_h__
 
 #include "nsThreadUtils.h"
 #include "AudioNodeStream.h"
 
 namespace mozilla {
 namespace dom {
 
-class PlayingRefChangeHandler final : public nsRunnable
+class PlayingRefChangeHandler final : public Runnable
 {
 public:
   enum ChangeType { ADDREF, RELEASE };
   PlayingRefChangeHandler(AudioNodeStream* aStream, ChangeType aChange)
     : mStream(aStream)
     , mChange(aChange)
   {
   }
--- a/dom/media/webaudio/ReportDecodeResultTask.h
+++ b/dom/media/webaudio/ReportDecodeResultTask.h
@@ -7,17 +7,17 @@
 #ifndef ReportDecodeResultTask_h_
 #define ReportDecodeResultTask_h_
 
 #include "mozilla/Attributes.h"
 #include "MediaBufferDecoder.h"
 
 namespace mozilla {
 
-class ReportDecodeResultTask final : public nsRunnable
+class ReportDecodeResultTask final : public Runnable
 {
 public:
   ReportDecodeResultTask(DecodeJob& aDecodeJob,
                          DecodeJob::ResultFn aFunction)
     : mDecodeJob(aDecodeJob)
     , mFunction(aFunction)
   {
     MOZ_ASSERT(aFunction);
--- a/dom/media/webaudio/ScriptProcessorNode.cpp
+++ b/dom/media/webaudio/ScriptProcessorNode.cpp
@@ -363,17 +363,17 @@ private:
     StreamTime playbackTick = mDestination->GraphTimeToStreamTime(aFrom);
     // Add the duration of the current sample
     playbackTick += WEBAUDIO_BLOCK_SIZE;
     // Add the delay caused by the main thread
     playbackTick += mSharedBuffers->DelaySoFar();
     // Compute the playback time in the coordinate system of the destination
     double playbackTime = mDestination->StreamTimeToSeconds(playbackTick);
 
-    class Command final : public nsRunnable
+    class Command final : public Runnable
     {
     public:
       Command(AudioNodeStream* aStream,
               already_AddRefed<ThreadSharedFloatArrayBufferList> aInputBuffer,
               double aPlaybackTime)
         : mStream(aStream)
         , mInputBuffer(aInputBuffer)
         , mPlaybackTime(aPlaybackTime)
--- a/dom/media/webaudio/blink/HRTFDatabaseLoader.cpp
+++ b/dom/media/webaudio/blink/HRTFDatabaseLoader.cpp
@@ -102,17 +102,17 @@ size_t HRTFDatabaseLoader::sizeOfIncludi
 
     if (m_hrtfDatabase) {
         amount += m_hrtfDatabase->sizeOfIncludingThis(aMallocSizeOf);
     }
 
     return amount;
 }
 
-class HRTFDatabaseLoader::ProxyReleaseEvent final : public nsRunnable {
+class HRTFDatabaseLoader::ProxyReleaseEvent final : public Runnable {
 public:
     explicit ProxyReleaseEvent(HRTFDatabaseLoader* loader) : mLoader(loader) {}
     NS_IMETHOD Run() override
     {
         mLoader->MainThreadRelease();
         return NS_OK;
     }
 private:
--- a/dom/media/webrtc/MediaEngineGonkVideoSource.cpp
+++ b/dom/media/webrtc/MediaEngineGonkVideoSource.cpp
@@ -559,17 +559,17 @@ MediaEngineGonkVideoSource::OnUserError(
     // Scope the monitor, since there is another monitor below and we don't want
     // unexpected deadlock.
     ReentrantMonitorAutoEnter sync(mCallbackMonitor);
     mCallbackMonitor.Notify();
   }
 
   // A main thread runnable to send error code to all queued
   // MediaEnginePhotoCallbacks.
-  class TakePhotoError : public nsRunnable {
+  class TakePhotoError : public Runnable {
   public:
     TakePhotoError(nsTArray<RefPtr<MediaEnginePhotoCallback>>& aCallbacks,
                    nsresult aRv)
       : mRv(aRv)
     {
       mCallbacks.SwapElements(aCallbacks);
     }
 
@@ -601,17 +601,17 @@ void
 MediaEngineGonkVideoSource::OnTakePictureComplete(const uint8_t* aData, uint32_t aLength, const nsAString& aMimeType)
 {
   // It needs to start preview because Gonk camera will stop preview while
   // taking picture.
   mCameraControl->StartPreview();
 
   // Create a main thread runnable to generate a blob and call all current queued
   // MediaEnginePhotoCallbacks.
-  class GenerateBlobRunnable : public nsRunnable {
+  class GenerateBlobRunnable : public Runnable {
   public:
     GenerateBlobRunnable(nsTArray<RefPtr<MediaEnginePhotoCallback>>& aCallbacks,
                          const uint8_t* aData,
                          uint32_t aLength,
                          const nsAString& aMimeType)
       : mPhotoDataLength(aLength)
     {
       mCallbacks.SwapElements(aCallbacks);
--- a/dom/media/webrtc/MediaEngineTabVideoSource.h
+++ b/dom/media/webrtc/MediaEngineTabVideoSource.h
@@ -47,31 +47,31 @@ class MediaEngineTabVideoSource : public
 
     nsresult TakePhoto(MediaEnginePhotoCallback* aCallback) override
     {
       return NS_ERROR_NOT_IMPLEMENTED;
     }
 
     void Draw();
 
-    class StartRunnable : public nsRunnable {
+    class StartRunnable : public Runnable {
     public:
       explicit StartRunnable(MediaEngineTabVideoSource *videoSource) : mVideoSource(videoSource) {}
       NS_IMETHOD Run();
       RefPtr<MediaEngineTabVideoSource> mVideoSource;
     };
 
-    class StopRunnable : public nsRunnable {
+    class StopRunnable : public Runnable {
     public:
       explicit StopRunnable(MediaEngineTabVideoSource *videoSource) : mVideoSource(videoSource) {}
       NS_IMETHOD Run();
       RefPtr<MediaEngineTabVideoSource> mVideoSource;
     };
 
-    class InitRunnable : public nsRunnable {
+    class InitRunnable : public Runnable {
     public:
       explicit InitRunnable(MediaEngineTabVideoSource *videoSource) : mVideoSource(videoSource) {}
       NS_IMETHOD Run();
       RefPtr<MediaEngineTabVideoSource> mVideoSource;
     };
 
 protected:
     ~MediaEngineTabVideoSource() {}
--- a/dom/media/webspeech/recognition/PocketSphinxSpeechRecognitionService.cpp
+++ b/dom/media/webspeech/recognition/PocketSphinxSpeechRecognitionService.cpp
@@ -25,17 +25,17 @@ extern "C" {
 #include "sphinxbase/sphinx_config.h"
 #include "sphinxbase/jsgf.h"
 }
 
 namespace mozilla {
 
 using namespace dom;
 
-class DecodeResultTask : public nsRunnable
+class DecodeResultTask : public Runnable
 {
 public:
   DecodeResultTask(const nsString& hypstring,
                    float64 confidence,
                    WeakPtr<dom::SpeechRecognition> recognition)
       : mResult(hypstring),
         mConfidence(confidence),
         mRecognition(recognition),
@@ -80,17 +80,17 @@ public:
 
 private:
   nsString mResult;
   float64 mConfidence;
   WeakPtr<dom::SpeechRecognition> mRecognition;
   nsCOMPtr<nsIThread> mWorkerThread;
 };
 
-class DecodeTask : public nsRunnable
+class DecodeTask : public Runnable
 {
 public:
   DecodeTask(WeakPtr<dom::SpeechRecognition> recogntion,
              const nsTArray<int16_t>& audiovector, ps_decoder_t* ps)
       : mRecognition(recogntion), mAudiovector(audiovector), mPs(ps)
   {
   }
 
--- a/dom/media/webspeech/recognition/SpeechRecognition.h
+++ b/dom/media/webspeech/recognition/SpeechRecognition.h
@@ -278,17 +278,17 @@ private:
   uint32_t mMaxAlternatives;
 
   void ProcessTestEventRequest(nsISupports* aSubject, const nsAString& aEventName);
 
   const char* GetName(FSMState aId);
   const char* GetName(SpeechEvent* aId);
 };
 
-class SpeechEvent : public nsRunnable
+class SpeechEvent : public Runnable
 {
 public:
   SpeechEvent(SpeechRecognition* aRecognition, SpeechRecognition::EventType aType)
   : mAudioSegment(0)
   , mRecognitionResultList(0)
   , mError(0)
   , mRecognition(aRecognition)
   , mType(aType)
--- a/dom/media/webspeech/synth/cocoa/OSXSpeechSynthesizerService.mm
+++ b/dom/media/webspeech/synth/cocoa/OSXSpeechSynthesizerService.mm
@@ -203,17 +203,17 @@ struct OSXVoice
   }
 
   nsString mUri;
   nsString mName;
   nsString mLocale;
   bool mIsDefault;
 };
 
-class RegisterVoicesRunnable final : public nsRunnable
+class RegisterVoicesRunnable final : public Runnable
 {
 public:
   RegisterVoicesRunnable(OSXSpeechSynthesizerService* aSpeechService,
                          nsTArray<OSXVoice>& aList)
     : mSpeechService(aSpeechService)
     , mVoices(aList)
   {
   }
@@ -251,17 +251,17 @@ RegisterVoicesRunnable::Run()
     }
   }
 
   registry->NotifyVoicesChanged();
 
   return NS_OK;
 }
 
-class EnumVoicesRunnable final : public nsRunnable
+class EnumVoicesRunnable final : public Runnable
 {
 public:
   explicit EnumVoicesRunnable(OSXSpeechSynthesizerService* aSpeechService)
     : mSpeechService(aSpeechService)
   {
   }
 
   NS_IMETHOD Run() override;
--- a/dom/media/webspeech/synth/pico/nsPicoService.cpp
+++ b/dom/media/webspeech/synth/pico/nsPicoService.cpp
@@ -205,17 +205,17 @@ public:
 
   // Speaker resource file
   nsCString mSgFile;
 
 private:
     ~PicoVoice() {}
 };
 
-class PicoCallbackRunnable : public nsRunnable,
+class PicoCallbackRunnable : public Runnable,
                              public nsISpeechTaskCallback
 {
   friend class PicoSynthDataRunnable;
 
 public:
   PicoCallbackRunnable(const nsAString& aText, PicoVoice* aVoice,
                        float aRate, float aPitch, nsISpeechTask* aTask,
                        nsPicoService* aService)
@@ -256,19 +256,19 @@ private:
   // a strong reference to this voice.
   PicoVoice* mVoice;
 
   // By holding a strong reference to the service we guarantee that it won't be
   // destroyed before this runnable.
   RefPtr<nsPicoService> mService;
 };
 
-NS_IMPL_ISUPPORTS_INHERITED(PicoCallbackRunnable, nsRunnable, nsISpeechTaskCallback)
+NS_IMPL_ISUPPORTS_INHERITED(PicoCallbackRunnable, Runnable, nsISpeechTaskCallback)
 
-// nsRunnable
+// Runnable
 
 NS_IMETHODIMP
 PicoCallbackRunnable::Run()
 {
   MOZ_ASSERT(!NS_IsMainThread());
   PicoApi::pico_Status status = 0;
 
   if (mService->CurrentVoice() != mVoice) {
@@ -337,17 +337,17 @@ PicoCallbackRunnable::Run()
 
   return NS_OK;
 }
 
 void
 PicoCallbackRunnable::DispatchSynthDataRunnable(
   already_AddRefed<SharedBuffer>&& aBuffer, size_t aBufferSize)
 {
-  class PicoSynthDataRunnable final : public nsRunnable
+  class PicoSynthDataRunnable final : public Runnable
   {
   public:
     PicoSynthDataRunnable(already_AddRefed<SharedBuffer>& aBuffer,
                           size_t aBufferSize, bool aFirstData,
                           PicoCallbackRunnable* aCallback)
       : mBuffer(aBuffer)
       , mBufferSize(aBufferSize)
       , mFirstData(aFirstData)
--- a/dom/media/webspeech/synth/test/nsFakeSynthServices.cpp
+++ b/dom/media/webspeech/synth/test/nsFakeSynthServices.cpp
@@ -133,17 +133,17 @@ private:
 
 NS_IMPL_ISUPPORTS(FakeDirectAudioSynth, nsISpeechService)
 
 NS_IMETHODIMP
 FakeDirectAudioSynth::Speak(const nsAString& aText, const nsAString& aUri,
                             float aVolume, float aRate, float aPitch,
                             nsISpeechTask* aTask)
 {
-  class Runnable final : public nsRunnable
+  class Runnable final : public mozilla::Runnable
   {
   public:
     Runnable(nsISpeechTask* aTask, const nsAString& aText) :
       mTask(aTask), mText(aText)
     {
     }
 
     NS_IMETHOD Run() override
@@ -196,17 +196,17 @@ private:
 
 NS_IMPL_ISUPPORTS(FakeIndirectAudioSynth, nsISpeechService)
 
 NS_IMETHODIMP
 FakeIndirectAudioSynth::Speak(const nsAString& aText, const nsAString& aUri,
                               float aVolume, float aRate, float aPitch,
                               nsISpeechTask* aTask)
 {
-  class DispatchStart final : public nsRunnable
+  class DispatchStart final : public Runnable
   {
   public:
     explicit DispatchStart(nsISpeechTask* aTask) :
       mTask(aTask)
     {
     }
 
     NS_IMETHOD Run() override
@@ -215,17 +215,17 @@ FakeIndirectAudioSynth::Speak(const nsAS
 
       return NS_OK;
     }
 
   private:
     nsCOMPtr<nsISpeechTask> mTask;
   };
 
-  class DispatchEnd final : public nsRunnable
+  class DispatchEnd final : public Runnable
   {
   public:
     DispatchEnd(nsISpeechTask* aTask, const nsAString& aText) :
       mTask(aTask), mText(aText)
     {
     }
 
     NS_IMETHOD Run() override
@@ -235,17 +235,17 @@ FakeIndirectAudioSynth::Speak(const nsAS
       return NS_OK;
     }
 
   private:
     nsCOMPtr<nsISpeechTask> mTask;
     nsString mText;
   };
 
-  class DispatchError final : public nsRunnable
+  class DispatchError final : public Runnable
   {
   public:
     DispatchError(nsISpeechTask* aTask, const nsAString& aText) :
       mTask(aTask), mText(aText)
     {
     }
 
     NS_IMETHOD Run() override
--- a/dom/network/UDPSocket.cpp
+++ b/dom/network/UDPSocket.cpp
@@ -536,17 +536,17 @@ UDPSocket::Init(const nsString& aLocalAd
     return rv.StealNSResult();
   }
 
   mClosed = Promise::Create(global, rv);
   if (NS_WARN_IF(rv.Failed())) {
     return rv.StealNSResult();
   }
 
-  class OpenSocketRunnable final : public nsRunnable
+  class OpenSocketRunnable final : public Runnable
   {
   public:
     explicit OpenSocketRunnable(UDPSocket* aSocket) : mSocket(aSocket)
     { }
 
     NS_IMETHOD Run() override
     {
       MOZ_ASSERT(mSocket);
--- a/dom/notification/DesktopNotification.cpp
+++ b/dom/notification/DesktopNotification.cpp
@@ -22,17 +22,17 @@
 
 namespace mozilla {
 namespace dom {
 
 /*
  * Simple Request
  */
 class DesktopNotificationRequest : public nsIContentPermissionRequest
-                                 , public nsRunnable
+                                 , public Runnable
 {
   virtual ~DesktopNotificationRequest()
   {
   }
 
   nsCOMPtr<nsIContentPermissionRequester> mRequester;
 public:
   NS_DECL_ISUPPORTS_INHERITED
@@ -269,17 +269,17 @@ DesktopNotificationCenter::WrapObject(JS
 {
   return DesktopNotificationCenterBinding::Wrap(aCx, this, aGivenProto);
 }
 
 /* ------------------------------------------------------------------------ */
 /* DesktopNotificationRequest                                               */
 /* ------------------------------------------------------------------------ */
 
-NS_IMPL_ISUPPORTS_INHERITED(DesktopNotificationRequest, nsRunnable,
+NS_IMPL_ISUPPORTS_INHERITED(DesktopNotificationRequest, Runnable,
                             nsIContentPermissionRequest)
 
 NS_IMETHODIMP
 DesktopNotificationRequest::GetPrincipal(nsIPrincipal * *aRequestingPrincipal)
 {
   if (!mDesktopNotification) {
     return NS_ERROR_NOT_INITIALIZED;
   }
--- a/dom/notification/Notification.cpp
+++ b/dom/notification/Notification.cpp
@@ -195,17 +195,17 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(Notifica
 NS_IMPL_CYCLE_COLLECTING_RELEASE(NotificationStorageCallback)
 NS_IMPL_CYCLE_COLLECTION(NotificationStorageCallback, mWindow, mPromise);
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(NotificationStorageCallback)
   NS_INTERFACE_MAP_ENTRY(nsINotificationStorageCallback)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
-class NotificationGetRunnable final : public nsRunnable
+class NotificationGetRunnable final : public Runnable
 {
   const nsString mOrigin;
   const nsString mTag;
   nsCOMPtr<nsINotificationStorageCallback> mCallback;
 public:
   NotificationGetRunnable(const nsAString& aOrigin,
                           const nsAString& aTag,
                           nsINotificationStorageCallback* aCallback)
@@ -305,17 +305,17 @@ public:
 
   NotificationPermission
   GetPermission()
   {
     return mPermission;
   }
 };
 
-class FocusWindowRunnable final : public nsRunnable
+class FocusWindowRunnable final : public Runnable
 {
   nsMainThreadPtrHandle<nsPIDOMWindowInner> mWindow;
 public:
   explicit FocusWindowRunnable(const nsMainThreadPtrHandle<nsPIDOMWindowInner>& aWindow)
     : mWindow(aWindow)
   { }
 
   NS_IMETHOD
@@ -515,17 +515,17 @@ public:
   Notification*
   GetNotification()
   {
     MOZ_ASSERT(Initialized());
     return mNotification;
   }
 };
 
-class NotificationTask : public nsRunnable
+class NotificationTask : public Runnable
 {
 public:
   enum NotificationAction {
     eShow,
     eClose
   };
 
   NotificationTask(UniquePtr<NotificationRef> aRef, NotificationAction aAction)
@@ -2181,17 +2181,17 @@ public:
 
 private:
   ~WorkerGetCallback()
   {}
 };
 
 NS_IMPL_ISUPPORTS(WorkerGetCallback, nsINotificationStorageCallback)
 
-class WorkerGetRunnable final : public nsRunnable
+class WorkerGetRunnable final : public Runnable
 {
   RefPtr<PromiseWorkerProxy> mPromiseProxy;
   const nsString mTag;
   const nsString mScope;
 public:
   WorkerGetRunnable(PromiseWorkerProxy* aProxy,
                     const nsAString& aTag,
                     const nsAString& aScope)
--- a/dom/plugins/base/android/ANPAudio.cpp
+++ b/dom/plugins/base/android/ANPAudio.cpp
@@ -102,17 +102,17 @@ struct ANPAudioTrack {
 
   void* user;
   ANPAudioCallbackProc proc;
   ANPSampleFormat format;
 
   ANPAudioTrack() : lock("ANPAudioTrack") { }
 };
 
-class AudioRunnable : public nsRunnable
+class AudioRunnable : public mozilla::Runnable
 {
 public:
   NS_DECL_NSIRUNNABLE
 
   AudioRunnable(ANPAudioTrack* aAudioTrack) {
     mTrack = aAudioTrack;
   }
 
--- a/dom/plugins/base/nsNPAPIPlugin.cpp
+++ b/dom/plugins/base/nsNPAPIPlugin.cpp
@@ -472,17 +472,17 @@ MakeNewNPAPIStreamInternal(NPP npp, cons
 #if defined(MOZ_MEMORY_WINDOWS)
 extern "C" size_t malloc_usable_size(const void *ptr);
 #endif
 
 namespace {
 
 static char *gNPPException;
 
-class nsPluginThreadRunnable : public nsRunnable,
+class nsPluginThreadRunnable : public Runnable,
                                public PRCList
 {
 public:
   nsPluginThreadRunnable(NPP instance, PluginThreadCallback func,
                          void *userData);
   virtual ~nsPluginThreadRunnable();
 
   NS_IMETHOD Run();
--- a/dom/plugins/base/nsNPAPIPluginInstance.cpp
+++ b/dom/plugins/base/nsNPAPIPluginInstance.cpp
@@ -60,17 +60,17 @@ using namespace mozilla::dom;
 #include "SurfaceTypes.h"
 #include "EGLUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::gl;
 
 typedef nsNPAPIPluginInstance::VideoInfo VideoInfo;
 
-class PluginEventRunnable : public nsRunnable
+class PluginEventRunnable : public Runnable
 {
 public:
   PluginEventRunnable(nsNPAPIPluginInstance* instance, ANPEvent* event)
     : mInstance(instance), mEvent(*event), mCanceled(false) {}
 
   virtual nsresult Run() {
     if (mCanceled)
       return NS_OK;
@@ -1634,17 +1634,17 @@ nsNPAPIPluginInstance::FinalizeAsyncSurf
 void
 nsNPAPIPluginInstance::SetCurrentAsyncSurface(NPAsyncSurface *surface, NPRect *changed)
 {
   if (mOwner) {
     mOwner->SetCurrentAsyncSurface(surface, changed);
   }
 }
 
-class CarbonEventModelFailureEvent : public nsRunnable {
+class CarbonEventModelFailureEvent : public Runnable {
 public:
   nsCOMPtr<nsIContent> mContent;
 
   explicit CarbonEventModelFailureEvent(nsIContent* aContent)
     : mContent(aContent)
   {}
 
   ~CarbonEventModelFailureEvent() {}
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -1399,17 +1399,17 @@ nsPluginHost::GetPluginForContentProcess
     pluginTag->mContentProcessRunningCount++;
     NS_ADDREF(*aPlugin = pluginTag->mPlugin);
     return NS_OK;
   }
 
   return NS_ERROR_FAILURE;
 }
 
-class nsPluginUnloadRunnable : public nsRunnable
+class nsPluginUnloadRunnable : public Runnable
 {
 public:
   explicit nsPluginUnloadRunnable(uint32_t aPluginId) : mPluginId(aPluginId) {}
 
   NS_IMETHOD Run()
   {
     RefPtr<nsPluginHost> host = nsPluginHost::GetInst();
     if (!host) {
@@ -4175,17 +4175,17 @@ nsPluginHost::DestroyRunningInstances(ns
         objectContent->PluginDestroyed();
       }
     }
   }
 }
 
 // Runnable that does an async destroy of a plugin.
 
-class nsPluginDestroyRunnable : public nsRunnable,
+class nsPluginDestroyRunnable : public Runnable,
                                 public PRCList
 {
 public:
   explicit nsPluginDestroyRunnable(nsNPAPIPluginInstance *aInstance)
     : mInstance(aInstance)
   {
     PR_INIT_CLIST(this);
     PR_APPEND_LINK(this, &sRunnableListHead);
--- a/dom/plugins/base/nsPluginInstanceOwner.cpp
+++ b/dom/plugins/base/nsPluginInstanceOwner.cpp
@@ -124,17 +124,17 @@ public:
   void Destroy(nsIContent* aContent);
 
   nsEventStatus ProcessEvent(const WidgetGUIEvent& anEvent)
   {
     return nsEventStatus_eConsumeNoDefault;
   }
 };
 
-class AsyncPaintWaitEvent : public nsRunnable
+class AsyncPaintWaitEvent : public Runnable
 {
 public:
   AsyncPaintWaitEvent(nsIContent* aContent, bool aFinished) :
     mContent(aContent), mFinished(aFinished)
   {
   }
 
   NS_IMETHOD Run()
--- a/dom/plugins/base/nsPluginNativeWindowWin.cpp
+++ b/dom/plugins/base/nsPluginNativeWindowWin.cpp
@@ -41,17 +41,17 @@ using namespace mozilla;
 #define WM_USER_FLASH WM_USER+1
 static UINT sWM_FLASHBOUNCEMSG = 0;
 
 typedef nsTWeakRef<class nsPluginNativeWindowWin> PluginWindowWeakRef;
 
 /**
  *  PLEvent handling code
  */
-class PluginWindowEvent : public nsRunnable {
+class PluginWindowEvent : public Runnable {
 public:
   PluginWindowEvent();
   void Init(const PluginWindowWeakRef &ref, HWND hWnd, UINT msg, WPARAM wParam,
             LPARAM lParam);
   void Clear();
   HWND   GetWnd()    { return mWnd; };
   UINT   GetMsg()    { return mMsg; };
   WPARAM GetWParam() { return mWParam; };
@@ -154,17 +154,17 @@ static bool ProcessFlashMessageDelayed(n
   nsCOMPtr<nsIRunnable> pwe = aWin->GetPluginWindowEvent(hWnd, msg, wParam, lParam);
   if (pwe) {
     NS_DispatchToCurrentThread(pwe);
     return true;
   }
   return false;
 }
 
-class nsDelayedPopupsEnabledEvent : public nsRunnable
+class nsDelayedPopupsEnabledEvent : public Runnable
 {
 public:
   nsDelayedPopupsEnabledEvent(nsNPAPIPluginInstance *inst)
     : mInst(inst)
   {}
 
   NS_DECL_NSIRUNNABLE
 
--- a/dom/plugins/ipc/PluginHangUIParent.cpp
+++ b/dom/plugins/ipc/PluginHangUIParent.cpp
@@ -28,17 +28,17 @@
 using base::ProcessHandle;
 
 using mozilla::widget::WidgetUtils;
 
 using std::string;
 using std::vector;
 
 namespace {
-class nsPluginHangUITelemetry : public nsRunnable
+class nsPluginHangUITelemetry : public mozilla::Runnable
 {
 public:
   nsPluginHangUITelemetry(int aResponseCode, int aDontAskCode,
                           uint32_t aResponseTimeMs, uint32_t aTimeoutMs)
     : mResponseCode(aResponseCode),
       mDontAskCode(aDontAskCode),
       mResponseTimeMs(aResponseTimeMs),
       mTimeoutMs(aTimeoutMs)
--- a/dom/plugins/ipc/PluginMessageUtils.cpp
+++ b/dom/plugins/ipc/PluginMessageUtils.cpp
@@ -14,17 +14,17 @@
 #include "PluginScriptableObjectChild.h"
 
 using std::string;
 
 using mozilla::ipc::MessageChannel;
 
 namespace {
 
-class DeferNPObjectReleaseRunnable : public nsRunnable
+class DeferNPObjectReleaseRunnable : public mozilla::Runnable
 {
 public:
   DeferNPObjectReleaseRunnable(const NPNetscapeFuncs* f, NPObject* o)
     : mFuncs(f)
     , mObject(o)
   {
     NS_ASSERTION(o, "no release null objects");
   }
--- a/dom/promise/Promise.cpp
+++ b/dom/promise/Promise.cpp
@@ -49,17 +49,17 @@ namespace {
 // Generator used by Promise::GetID.
 Atomic<uintptr_t> gIDGenerator(0);
 } // namespace
 
 using namespace workers;
 
 #ifndef SPIDERMONKEY_PROMISE
 // This class processes the promise's callbacks with promise's result.
-class PromiseReactionJob final : public nsRunnable
+class PromiseReactionJob final : public Runnable
 {
 public:
   PromiseReactionJob(Promise* aPromise,
                      PromiseCallback* aCallback,
                      const JS::Value& aValue)
     : mPromise(aPromise)
     , mCallback(aCallback)
     , mValue(CycleCollectedJSRuntime::Get()->Runtime(), aValue)
@@ -175,17 +175,17 @@ GetPromise(JSContext* aCx, JS::Handle<JS
   Promise* promise;
   UNWRAP_OBJECT(Promise, &promiseVal.toObject(), promise);
   return promise;
 }
 } // namespace
 
 // Runnable to resolve thenables.
 // Equivalent to the specification's ResolvePromiseViaThenableTask.
-class PromiseResolveThenableJob final : public nsRunnable
+class PromiseResolveThenableJob final : public Runnable
 {
 public:
   PromiseResolveThenableJob(Promise* aPromise,
                             JS::Handle<JSObject*> aThenable,
                             PromiseInit* aThen)
     : mPromise(aPromise)
     , mThenable(CycleCollectedJSRuntime::Get()->Runtime(), aThenable)
     , mThen(aThen)
--- a/dom/push/PushManager.cpp
+++ b/dom/push/PushManager.cpp
@@ -257,17 +257,17 @@ protected:
 
 private:
   RefPtr<PromiseWorkerProxy> mProxy;
   nsString mScope;
 };
 
 NS_IMPL_ISUPPORTS(GetSubscriptionCallback, nsIPushSubscriptionCallback)
 
-class GetSubscriptionRunnable final : public nsRunnable
+class GetSubscriptionRunnable final : public Runnable
 {
 public:
   GetSubscriptionRunnable(PromiseWorkerProxy* aProxy,
                           const nsAString& aScope,
                           PushManager::SubscriptionAction aAction,
                           nsTArray<uint8_t>&& aAppServerKey)
     : mProxy(aProxy)
     , mScope(aScope)
@@ -388,17 +388,17 @@ private:
   ~PermissionResultRunnable()
   {}
 
   RefPtr<PromiseWorkerProxy> mProxy;
   nsresult mStatus;
   PushPermissionState mState;
 };
 
-class PermissionStateRunnable final : public nsRunnable
+class PermissionStateRunnable final : public Runnable
 {
 public:
   explicit PermissionStateRunnable(PromiseWorkerProxy* aProxy)
     : mProxy(aProxy)
   {}
 
   NS_IMETHOD
   Run() override
--- a/dom/push/PushSubscription.cpp
+++ b/dom/push/PushSubscription.cpp
@@ -133,17 +133,17 @@ private:
   {
   }
 
   RefPtr<PromiseWorkerProxy> mProxy;
 };
 
 NS_IMPL_ISUPPORTS(WorkerUnsubscribeResultCallback, nsIUnsubscribeResultCallback)
 
-class UnsubscribeRunnable final : public nsRunnable
+class UnsubscribeRunnable final : public Runnable
 {
 public:
   UnsubscribeRunnable(PromiseWorkerProxy* aProxy,
                       const nsAString& aScope)
     : mProxy(aProxy)
     , mScope(aScope)
   {
     MOZ_ASSERT(aProxy);
--- a/dom/quota/ActorsParent.cpp
+++ b/dom/quota/ActorsParent.cpp
@@ -299,17 +299,17 @@ public:
   NS_INLINE_DECL_REFCOUNTING(DirectoryLockImpl)
 
 private:
   ~DirectoryLockImpl();
 };
 
 class QuotaManager::CreateRunnable final
   : public BackgroundThreadObject
-  , public nsRunnable
+  , public Runnable
 {
   nsTArray<nsCOMPtr<nsIRunnable>> mCallbacks;
   nsString mBaseDirPath;
   RefPtr<QuotaManager> mManager;
   nsresult mResultCode;
 
   enum class State
   {
@@ -357,17 +357,17 @@ private:
 
   State
   GetNextState(nsCOMPtr<nsIEventTarget>& aThread);
 
   NS_DECL_NSIRUNNABLE
 };
 
 class QuotaManager::ShutdownRunnable final
-  : public nsRunnable
+  : public Runnable
 {
   // Only touched on the main thread.
   bool& mDone;
 
 public:
   explicit ShutdownRunnable(bool& aDone)
     : mDone(aDone)
   {
@@ -598,17 +598,17 @@ private:
 
   RefPtr<GroupInfo> mTemporaryStorageGroupInfo;
   RefPtr<GroupInfo> mDefaultStorageGroupInfo;
 };
 
 namespace {
 
 class CollectOriginsHelper final
-  : public nsRunnable
+  : public Runnable
 {
   uint64_t mMinSizeToBeFreed;
 
   Mutex& mMutex;
   CondVar mCondVar;
 
   // The members below are protected by mMutex.
   nsTArray<RefPtr<DirectoryLockImpl>> mLocks;
@@ -630,17 +630,17 @@ private:
   { }
 
   NS_IMETHOD
   Run();
 };
 
 class OriginOperationBase
   : public BackgroundThreadObject
-  , public nsRunnable
+  , public Runnable
 {
 protected:
   nsresult mResultCode;
 
   enum State {
     // Not yet run.
     State_Initial,
 
@@ -1232,17 +1232,17 @@ mozilla::Atomic<bool> gShutdown(false);
 static const int32_t kDefaultFixedLimitKB = -1;
 static const uint32_t kDefaultChunkSizeKB = 10 * 1024;
 int32_t gFixedLimitKB = kDefaultFixedLimitKB;
 uint32_t gChunkSizeKB = kDefaultChunkSizeKB;
 
 bool gTestingEnabled = false;
 
 class StorageDirectoryHelper final
-  : public nsRunnable
+  : public Runnable
 {
   struct OriginProps;
 
   nsTArray<OriginProps> mOriginProps;
 
   nsCOMPtr<nsIFile> mDirectory;
   mozilla::Mutex mMutex;
   mozilla::CondVar mCondVar;
@@ -5035,17 +5035,17 @@ FinalizeOriginEvictionOp::UnblockOpen()
   NoteActorDestroyed();
 #endif
 
   mLocks.Clear();
 
   AdvanceState();
 }
 
-NS_IMPL_ISUPPORTS_INHERITED0(NormalOriginOperationBase, nsRunnable)
+NS_IMPL_ISUPPORTS_INHERITED0(NormalOriginOperationBase, Runnable)
 
 void
 NormalOriginOperationBase::Open()
 {
   AssertIsOnOwningThread();
   MOZ_ASSERT(GetState() == State_CreatingQuotaManager);
   MOZ_ASSERT(QuotaManager::Get());
 
--- a/dom/quota/QuotaManagerService.cpp
+++ b/dom/quota/QuotaManagerService.cpp
@@ -57,17 +57,17 @@ TestingPrefChangedCallback(const char* a
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(!strcmp(aPrefName, kTestingPref));
   MOZ_ASSERT(!aClosure);
 
   gTestingMode = Preferences::GetBool(aPrefName);
 }
 
 class AbortOperationsRunnable final
-  : public nsRunnable
+  : public Runnable
 {
   ContentParentId mContentParentId;
 
 public:
   explicit AbortOperationsRunnable(ContentParentId aContentParentId)
     : mContentParentId(aContentParentId)
   { }
 
--- a/dom/security/nsCSPContext.cpp
+++ b/dom/security/nsCSPContext.cpp
@@ -983,17 +983,17 @@ nsCSPContext::SendReports(nsISupports* a
     }
   }
   return NS_OK;
 }
 
 /**
  * Dispatched from the main thread to send reports for one CSP violation.
  */
-class CSPReportSenderRunnable final : public nsRunnable
+class CSPReportSenderRunnable final : public Runnable
 {
   public:
     CSPReportSenderRunnable(nsISupports* aBlockedContentSource,
                             nsIURI* aOriginalURI,
                             uint32_t aViolatedPolicyIndex,
                             bool aReportOnlyFlag,
                             const nsAString& aViolatedDirective,
                             const nsAString& aObserverSubject,
--- a/dom/security/nsMixedContentBlocker.cpp
+++ b/dom/security/nsMixedContentBlocker.cpp
@@ -52,17 +52,17 @@ enum nsMixedContentBlockerMessageType {
 bool nsMixedContentBlocker::sBlockMixedScript = false;
 
 // Is mixed display content blocking (images, audio, video, <a ping>) enabled?
 bool nsMixedContentBlocker::sBlockMixedDisplay = false;
 
 // Fired at the document that attempted to load mixed content.  The UI could
 // handle this event, for example, by displaying an info bar that offers the
 // choice to reload the page with mixed content permitted.
-class nsMixedContentEvent : public nsRunnable
+class nsMixedContentEvent : public Runnable
 {
 public:
   nsMixedContentEvent(nsISupports *aContext, MixedContentTypes aType, bool aRootHasSecureConnection)
     : mContext(aContext), mType(aType), mRootHasSecureConnection(aRootHasSecureConnection)
   {}
 
   NS_IMETHOD Run()
   {
--- a/dom/smil/nsSMILTimedElement.cpp
+++ b/dom/smil/nsSMILTimedElement.cpp
@@ -73,17 +73,17 @@ nsSMILTimedElement::InstanceTimeComparat
   return cmp == 0 ? aElem1->Serial() < aElem2->Serial() : cmp < 0;
 }
 
 //----------------------------------------------------------------------
 // Helper class: AsyncTimeEventRunner
 
 namespace
 {
-  class AsyncTimeEventRunner : public nsRunnable
+  class AsyncTimeEventRunner : public Runnable
   {
   protected:
     RefPtr<nsIContent> mTarget;
     EventMessage         mMsg;
     int32_t              mDetail;
 
   public:
     AsyncTimeEventRunner(nsIContent* aTarget, EventMessage aMsg,
--- a/dom/storage/DOMStorage.cpp
+++ b/dom/storage/DOMStorage.cpp
@@ -171,17 +171,17 @@ DOMStorage::Clear(ErrorResult& aRv)
 
   if (!aRv.ErrorCodeIs(NS_SUCCESS_DOM_NO_OPERATION)) {
     BroadcastChangeNotification(NullString(), NullString(), NullString());
   }
 }
 
 namespace {
 
-class StorageNotifierRunnable : public nsRunnable
+class StorageNotifierRunnable : public Runnable
 {
 public:
   StorageNotifierRunnable(nsISupports* aSubject, const char16_t* aType)
     : mSubject(aSubject), mType(aType)
   { }
 
   NS_DECL_NSIRUNNABLE
 
--- a/dom/storage/DOMStorageCache.cpp
+++ b/dom/storage/DOMStorageCache.cpp
@@ -685,17 +685,17 @@ DOMStorageCache::LoadWait()
 DOMStorageUsage::DOMStorageUsage(const nsACString& aOriginScope)
   : mOriginScope(aOriginScope)
 {
   mUsage[kDefaultSet] = mUsage[kPrivateSet] = mUsage[kSessionSet] = 0LL;
 }
 
 namespace {
 
-class LoadUsageRunnable : public nsRunnable
+class LoadUsageRunnable : public Runnable
 {
 public:
   LoadUsageRunnable(int64_t* aUsage, const int64_t aDelta)
     : mTarget(aUsage)
     , mDelta(aDelta)
   {}
 
 private:
--- a/dom/storage/DOMStorageIPC.cpp
+++ b/dom/storage/DOMStorageIPC.cpp
@@ -295,17 +295,17 @@ DOMStorageDBParent::ReleaseIPDLReference
 {
   MOZ_ASSERT(mIPCOpen, "Attempting to release non-existent IPDL reference");
   mIPCOpen = false;
   Release();
 }
 
 namespace {
 
-class SendInitialChildDataRunnable : public nsRunnable
+class SendInitialChildDataRunnable : public Runnable
 {
 public:
   explicit SendInitialChildDataRunnable(DOMStorageDBParent* aParent)
     : mParent(aParent)
   {}
 
 private:
   NS_IMETHOD Run()
@@ -628,17 +628,17 @@ DOMStorageDBParent::Observe(const char* 
   }
 
   return NS_OK;
 }
 
 namespace {
 
 // Results must be sent back on the main thread
-class LoadRunnable : public nsRunnable
+class LoadRunnable : public Runnable
 {
 public:
   enum TaskType {
     loadItem,
     loadDone
   };
 
   LoadRunnable(DOMStorageDBParent* aParent,
@@ -741,17 +741,17 @@ DOMStorageDBParent::CacheParentBridge::L
   // Should never be called on this implementation
   MOZ_ASSERT(false);
 }
 
 // DOMStorageDBParent::UsageParentBridge
 
 namespace {
 
-class UsageRunnable : public nsRunnable
+class UsageRunnable : public Runnable
 {
 public:
   UsageRunnable(DOMStorageDBParent* aParent, const nsACString& aOriginScope, const int64_t& aUsage)
   : mParent(aParent)
   , mOriginScope(aOriginScope)
   , mUsage(aUsage)
   {}
 
--- a/dom/system/nsDeviceSensors.cpp
+++ b/dom/system/nsDeviceSensors.cpp
@@ -132,17 +132,17 @@ NS_IMETHODIMP nsDeviceSensors::HasWindow
   if (!mEnabled)
     *aRetVal = false;
   else
     *aRetVal = mWindowListeners[aType]->IndexOf(aWindow) != NoIndex;
 
   return NS_OK;
 }
 
-class DeviceSensorTestEvent : public nsRunnable
+class DeviceSensorTestEvent : public Runnable
 {
 public:
   DeviceSensorTestEvent(nsDeviceSensors* aTarget,
                         uint32_t aType)
   : mTarget(aTarget)
   , mType(aType)
   {
   }
--- a/dom/u2f/U2F.h
+++ b/dom/u2f/U2F.h
@@ -23,35 +23,29 @@
 namespace mozilla {
 namespace dom {
 
 struct RegisterRequest;
 struct RegisteredKey;
 class U2FRegisterCallback;
 class U2FSignCallback;
 
-} // namespace dom
-} // namespace mozilla
-
-namespace mozilla {
-namespace dom {
-
 // These enumerations are defined in the FIDO U2F Javascript API under the
 // interface "ErrorCode" as constant integers, and thus in the U2F.webidl file.
 // Any changes to these must occur in both locations.
 enum class ErrorCode {
   OK = 0,
   OTHER_ERROR = 1,
   BAD_REQUEST = 2,
   CONFIGURATION_UNSUPPORTED = 3,
   DEVICE_INELIGIBLE = 4,
   TIMEOUT = 5
 };
 
-class U2FTask : public nsRunnable
+class U2FTask : public Runnable
 {
 public:
   U2FTask(const nsAString& aOrigin,
           const nsAString& aAppId);
 
   nsString mOrigin;
   nsString mAppId;
 
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -580,17 +580,17 @@ InterruptCallback(JSContext* aCx)
   MOZ_ASSERT(worker);
 
   // Now is a good time to turn on profiling if it's pending.
   profiler_js_operation_callback();
 
   return worker->InterruptCallback(aCx);
 }
 
-class LogViolationDetailsRunnable final : public nsRunnable
+class LogViolationDetailsRunnable final : public Runnable
 {
   WorkerPrivate* mWorkerPrivate;
   nsCOMPtr<nsIEventTarget> mSyncLoopTarget;
   nsString mFileName;
   uint32_t mLineNum;
 
 public:
   LogViolationDetailsRunnable(WorkerPrivate* aWorker,
@@ -1030,23 +1030,23 @@ private:
 
   virtual void
   ActorFailed() override
   {
     *mDone = true;
   }
 };
 
-class WorkerThreadPrimaryRunnable final : public nsRunnable
+class WorkerThreadPrimaryRunnable final : public Runnable
 {
   WorkerPrivate* mWorkerPrivate;
   RefPtr<WorkerThread> mThread;
   JSRuntime* mParentRuntime;
 
-  class FinishedRunnable final : public nsRunnable
+  class FinishedRunnable final : public Runnable
   {
     RefPtr<WorkerThread> mThread;
 
   public:
     explicit FinishedRunnable(already_AddRefed<WorkerThread> aThread)
     : mThread(aThread)
     {
       MOZ_ASSERT(mThread);
@@ -2586,17 +2586,17 @@ RuntimeService::JSVersionChanged(const c
 {
   AssertIsOnMainThread();
 
   bool useLatest = Preferences::GetBool("dom.workers.latestJSVersion", false);
   JS::CompartmentOptions& options = sDefaultJSSettings.content.compartmentOptions;
   options.behaviors().setVersion(useLatest ? JSVERSION_LATEST : JSVERSION_DEFAULT);
 }
 
-NS_IMPL_ISUPPORTS_INHERITED0(LogViolationDetailsRunnable, nsRunnable)
+NS_IMPL_ISUPPORTS_INHERITED0(LogViolationDetailsRunnable, Runnable)
 
 NS_IMETHODIMP
 LogViolationDetailsRunnable::Run()
 {
   AssertIsOnMainThread();
 
   nsIContentSecurityPolicy* csp = mWorkerPrivate->GetCSP();
   if (csp) {
@@ -2614,17 +2614,17 @@ LogViolationDetailsRunnable::Run()
                                        true);
   MOZ_ALWAYS_TRUE(response->Dispatch());
 
   return NS_OK;
 }
 
 NS_IMPL_ISUPPORTS(WorkerBackgroundChildCallback, nsIIPCBackgroundChildCreateCallback)
 
-NS_IMPL_ISUPPORTS_INHERITED0(WorkerThreadPrimaryRunnable, nsRunnable)
+NS_IMPL_ISUPPORTS_INHERITED0(WorkerThreadPrimaryRunnable, Runnable)
 
 NS_IMETHODIMP
 WorkerThreadPrimaryRunnable::Run()
 {
   using mozilla::ipc::BackgroundChild;
 
 #ifdef MOZ_NUWA_PROCESS
   if (IsNuwaProcess()) {
@@ -2767,17 +2767,17 @@ WorkerThreadPrimaryRunnable::Synchronous
   if (NS_WARN_IF(!BackgroundChild::GetForCurrentThread())) {
     return NS_ERROR_FAILURE;
   }
 
   return NS_OK;
 }
 
 NS_IMPL_ISUPPORTS_INHERITED0(WorkerThreadPrimaryRunnable::FinishedRunnable,
-                             nsRunnable)
+                             Runnable)
 
 NS_IMETHODIMP
 WorkerThreadPrimaryRunnable::FinishedRunnable::Run()
 {
   AssertIsOnMainThread();
 
   RefPtr<WorkerThread> thread;
   mThread.swap(thread);
--- a/dom/workers/ScriptLoader.cpp
+++ b/dom/workers/ScriptLoader.cpp
@@ -1650,17 +1650,17 @@ CacheScriptLoader::OnStreamComplete(nsIS
   mLoadInfo.mCacheStatus = ScriptLoadInfo::Cached;
 
   MOZ_ASSERT(mPrincipalInfo);
   mRunnable->DataReceivedFromCache(mIndex, aString, aStringLen, mChannelInfo,
                                    Move(mPrincipalInfo));
   return NS_OK;
 }
 
-class ChannelGetterRunnable final : public nsRunnable
+class ChannelGetterRunnable final : public Runnable
 {
   WorkerPrivate* mParentWorker;
   nsCOMPtr<nsIEventTarget> mSyncLoopTarget;
   const nsAString& mScriptURL;
   nsIChannel** mChannel;
   nsresult mResult;
 
 public:
--- a/dom/workers/ServiceWorkerClient.cpp
+++ b/dom/workers/ServiceWorkerClient.cpp
@@ -80,17 +80,17 @@ JSObject*
 ServiceWorkerClient::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return ClientBinding::Wrap(aCx, this, aGivenProto);
 }
 
 namespace {
 
 class ServiceWorkerClientPostMessageRunnable final
-  : public nsRunnable
+  : public Runnable
   , public StructuredCloneHolder
 {
   uint64_t mWindowId;
 
 public:
   explicit ServiceWorkerClientPostMessageRunnable(uint64_t aWindowId)
     : StructuredCloneHolder(CloningSupported, TransferringSupported,
                             SameProcessDifferentThread)
--- a/dom/workers/ServiceWorkerClients.cpp
+++ b/dom/workers/ServiceWorkerClients.cpp
@@ -55,17 +55,17 @@ ServiceWorkerClients::ServiceWorkerClien
 JSObject*
 ServiceWorkerClients::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return ClientsBinding::Wrap(aCx, this, aGivenProto);
 }
 
 namespace {
 
-class GetRunnable final : public nsRunnable
+class GetRunnable final : public Runnable
 {
   class ResolvePromiseWorkerRunnable final : public WorkerRunnable
   {
     RefPtr<PromiseWorkerProxy> mPromiseProxy;
     UniquePtr<ServiceWorkerClientInfo> mValue;
     nsresult mRv;
 
   public:
@@ -137,17 +137,17 @@ public:
                                        rv.StealNSResult());
     rv.SuppressException();
 
     r->Dispatch();
     return NS_OK;
   }
 };
 
-class MatchAllRunnable final : public nsRunnable
+class MatchAllRunnable final : public Runnable
 {
   class ResolvePromiseWorkerRunnable final : public WorkerRunnable
   {
     RefPtr<PromiseWorkerProxy> mPromiseProxy;
     nsTArray<ServiceWorkerClientInfo> mValue;
 
   public:
     ResolvePromiseWorkerRunnable(WorkerPrivate* aWorkerPrivate,
@@ -251,17 +251,17 @@ public:
       promise->MaybeReject(NS_ERROR_DOM_INVALID_STATE_ERR);
     }
 
     mPromiseProxy->CleanUp();
     return true;
   }
 };
 
-class ClaimRunnable final : public nsRunnable
+class ClaimRunnable final : public Runnable
 {
   RefPtr<PromiseWorkerProxy> mPromiseProxy;
   nsCString mScope;
   uint64_t mServiceWorkerID;
 
 public:
   ClaimRunnable(PromiseWorkerProxy* aPromiseProxy, const nsCString& aScope)
     : mPromiseProxy(aPromiseProxy)
@@ -464,17 +464,17 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(WebProg
 NS_IMPL_CYCLE_COLLECTION(WebProgressListener, mPromiseProxy,
                          mServiceWorkerPrivate, mWindow)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(WebProgressListener)
   NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
 NS_INTERFACE_MAP_END
 
-class OpenWindowRunnable final : public nsRunnable
+class OpenWindowRunnable final : public Runnable
 {
   RefPtr<PromiseWorkerProxy> mPromiseProxy;
   nsString mUrl;
   nsString mScope;
 
 public:
   OpenWindowRunnable(PromiseWorkerProxy* aPromiseProxy,
                      const nsAString& aUrl,
--- a/dom/workers/ServiceWorkerEvents.cpp
+++ b/dom/workers/ServiceWorkerEvents.cpp
@@ -151,17 +151,17 @@ FetchEvent::Constructor(const GlobalObje
   e->mRequest = aOptions.mRequest;
   e->mClientId = aOptions.mClientId;
   e->mIsReload = aOptions.mIsReload;
   return e.forget();
 }
 
 namespace {
 
-class FinishResponse final : public nsRunnable
+class FinishResponse final : public Runnable
 {
   nsMainThreadPtrHandle<nsIInterceptedChannel> mChannel;
   RefPtr<InternalResponse> mInternalResponse;
   ChannelInfo mWorkerChannelInfo;
   const nsCString mScriptSpec;
   const nsCString mResponseURLSpec;
 
 public:
--- a/dom/workers/ServiceWorkerEvents.h
+++ b/dom/workers/ServiceWorkerEvents.h
@@ -33,17 +33,17 @@ class Request;
 class ResponseOrPromise;
 
 struct PushEventInit;
 } // namespace dom
 } // namespace mozilla
 
 BEGIN_WORKERS_NAMESPACE
 
-class CancelChannelRunnable final : public nsRunnable
+class CancelChannelRunnable final : public Runnable
 {
   nsMainThreadPtrHandle<nsIInterceptedChannel> mChannel;
   const nsresult mStatus;
 public:
   CancelChannelRunnable(nsMainThreadPtrHandle<nsIInterceptedChannel>& aChannel,
                         nsresult aStatus);
 
   NS_IMETHOD Run() override;
--- a/dom/workers/ServiceWorkerInfo.cpp
+++ b/dom/workers/ServiceWorkerInfo.cpp
@@ -76,17 +76,17 @@ ServiceWorkerInfo::RemoveWorker(ServiceW
 #endif
   MOZ_ASSERT(mInstances.Contains(aWorker));
 
   mInstances.RemoveElement(aWorker);
 }
 
 namespace {
 
-class ChangeStateUpdater final : public nsRunnable
+class ChangeStateUpdater final : public Runnable
 {
 public:
   ChangeStateUpdater(const nsTArray<ServiceWorker*>& aInstances,
                      ServiceWorkerState aState)
     : mState(aState)
   {
     for (size_t i = 0; i < aInstances.Length(); ++i) {
       mInstances.AppendElement(aInstances[i]);
--- a/dom/workers/ServiceWorkerManager.cpp
+++ b/dom/workers/ServiceWorkerManager.cpp
@@ -185,17 +185,17 @@ PopulateRegistrationData(nsIPrincipal* a
   if (aRegistration->GetActive()) {
     aData.currentWorkerURL() = aRegistration->GetActive()->ScriptSpec();
     aData.cacheName() = aRegistration->GetActive()->CacheName();
   }
 
   return NS_OK;
 }
 
-class TeardownRunnable final : public nsRunnable
+class TeardownRunnable final : public Runnable
 {
 public:
   explicit TeardownRunnable(ServiceWorkerManagerChild* aActor)
     : mActor(aActor)
   {
     MOZ_ASSERT(mActor);
   }
 
@@ -400,17 +400,17 @@ GetRequiredScopeStringPrefix(nsIURI* aSc
 
     aPrefix.Append(path);
   } else {
     MOZ_ASSERT_UNREACHABLE("Invalid value for aPrefixMode");
   }
   return NS_OK;
 }
 
-class PropagateSoftUpdateRunnable final : public nsRunnable
+class PropagateSoftUpdateRunnable final : public Runnable
 {
 public:
   PropagateSoftUpdateRunnable(const PrincipalOriginAttributes& aOriginAttributes,
                               const nsAString& aScope)
     : mOriginAttributes(aOriginAttributes)
     , mScope(aScope)
   {}
 
@@ -428,17 +428,17 @@ public:
 private:
   ~PropagateSoftUpdateRunnable()
   {}
 
   const PrincipalOriginAttributes mOriginAttributes;
   const nsString mScope;
 };
 
-class PropagateUnregisterRunnable final : public nsRunnable
+class PropagateUnregisterRunnable final : public Runnable
 {
 public:
   PropagateUnregisterRunnable(nsIPrincipal* aPrincipal,
                               nsIServiceWorkerUnregisterCallback* aCallback,
                               const nsAString& aScope)
     : mPrincipal(aPrincipal)
     , mCallback(aCallback)
     , mScope(aScope)
@@ -465,17 +465,17 @@ private:
   ~PropagateUnregisterRunnable()
   {}
 
   nsCOMPtr<nsIPrincipal> mPrincipal;
   nsCOMPtr<nsIServiceWorkerUnregisterCallback> mCallback;
   const nsString mScope;
 };
 
-class RemoveRunnable final : public nsRunnable
+class RemoveRunnable final : public Runnable
 {
 public:
   explicit RemoveRunnable(const nsACString& aHost)
   {}
 
   NS_IMETHOD Run() override
   {
     AssertIsOnMainThread();
@@ -489,17 +489,17 @@ public:
 
 private:
   ~RemoveRunnable()
   {}
 
   const nsCString mHost;
 };
 
-class PropagateRemoveRunnable final : public nsRunnable
+class PropagateRemoveRunnable final : public Runnable
 {
 public:
   explicit PropagateRemoveRunnable(const nsACString& aHost)
   {}
 
   NS_IMETHOD Run() override
   {
     AssertIsOnMainThread();
@@ -513,17 +513,17 @@ public:
 
 private:
   ~PropagateRemoveRunnable()
   {}
 
   const nsCString mHost;
 };
 
-class PropagateRemoveAllRunnable final : public nsRunnable
+class PropagateRemoveAllRunnable final : public Runnable
 {
 public:
   PropagateRemoveAllRunnable()
   {}
 
   NS_IMETHOD Run() override
   {
     AssertIsOnMainThread();
@@ -734,17 +734,17 @@ ServiceWorkerManager::AppendPendingOpera
   if (!mShuttingDown) {
     mPendingOperations.AppendElement(aRunnable);
   }
 }
 
 /*
  * Implements the async aspects of the getRegistrations algorithm.
  */
-class GetRegistrationsRunnable final : public nsRunnable
+class GetRegistrationsRunnable final : public Runnable
 {
   nsCOMPtr<nsPIDOMWindowInner> mWindow;
   RefPtr<Promise> mPromise;
 public:
   GetRegistrationsRunnable(nsPIDOMWindowInner* aWindow, Promise* aPromise)
     : mWindow(aWindow), mPromise(aPromise)
   {}
 
@@ -849,17 +849,17 @@ ServiceWorkerManager::GetRegistrations(m
     new GetRegistrationsRunnable(window, promise);
   promise.forget(aPromise);
   return NS_DispatchToCurrentThread(runnable);
 }
 
 /*
  * Implements the async aspects of the getRegistration algorithm.
  */
-class GetRegistrationRunnable final : public nsRunnable
+class GetRegistrationRunnable final : public Runnable
 {
   nsCOMPtr<nsPIDOMWindowInner> mWindow;
   RefPtr<Promise> mPromise;
   nsString mDocumentURL;
 
 public:
   GetRegistrationRunnable(nsPIDOMWindowInner* aWindow, Promise* aPromise,
                           const nsAString& aDocumentURL)
@@ -951,17 +951,17 @@ ServiceWorkerManager::GetRegistration(mo
   }
 
   nsCOMPtr<nsIRunnable> runnable =
     new GetRegistrationRunnable(window, promise, aDocumentURL);
   promise.forget(aPromise);
   return NS_DispatchToCurrentThread(runnable);
 }
 
-class GetReadyPromiseRunnable final : public nsRunnable
+class GetReadyPromiseRunnable final : public Runnable
 {
   nsCOMPtr<nsPIDOMWindowInner> mWindow;
   RefPtr<Promise> mPromise;
 
 public:
   GetReadyPromiseRunnable(nsPIDOMWindowInner* aWindow, Promise* aPromise)
     : mWindow(aWindow), mPromise(aPromise)
   {}
@@ -2169,17 +2169,17 @@ ServiceWorkerManager::GetServiceWorkerFo
 
   serviceWorker->SetState(info->State());
   serviceWorker.forget(aServiceWorker);
   return NS_OK;
 }
 
 namespace {
 
-class ContinueDispatchFetchEventRunnable : public nsRunnable
+class ContinueDispatchFetchEventRunnable : public Runnable
 {
   RefPtr<ServiceWorkerPrivate> mServiceWorkerPrivate;
   nsCOMPtr<nsIInterceptedChannel> mChannel;
   nsCOMPtr<nsILoadGroup> mLoadGroup;
   nsString mDocumentId;
   bool mIsReload;
 public:
   ContinueDispatchFetchEventRunnable(ServiceWorkerPrivate* aServiceWorkerPrivate,
--- a/dom/workers/ServiceWorkerManagerParent.cpp
+++ b/dom/workers/ServiceWorkerManagerParent.cpp
@@ -20,17 +20,17 @@ using namespace ipc;
 
 namespace dom {
 namespace workers {
 
 namespace {
 
 uint64_t sServiceWorkerManagerParentID = 0;
 
-class RegisterServiceWorkerCallback final : public nsRunnable
+class RegisterServiceWorkerCallback final : public Runnable
 {
 public:
   RegisterServiceWorkerCallback(const ServiceWorkerRegistrationData& aData,
                                 uint64_t aParentID)
     : mData(aData)
     , mParentID(aParentID)
   {
     AssertIsInMainProcess();
@@ -58,17 +58,17 @@ public:
     return NS_OK;
   }
 
 private:
   ServiceWorkerRegistrationData mData;
   const uint64_t mParentID;
 };
 
-class UnregisterServiceWorkerCallback final : public nsRunnable
+class UnregisterServiceWorkerCallback final : public Runnable
 {
 public:
   UnregisterServiceWorkerCallback(const PrincipalInfo& aPrincipalInfo,
                                   const nsString& aScope,
                                   uint64_t aParentID)
     : mPrincipalInfo(aPrincipalInfo)
     , mScope(aScope)
     , mParentID(aParentID)
@@ -101,22 +101,22 @@ public:
   }
 
 private:
   const PrincipalInfo mPrincipalInfo;
   nsString mScope;
   uint64_t mParentID;
 };
 
-class CheckPrincipalWithCallbackRunnable final : public nsRunnable
+class CheckPrincipalWithCallbackRunnable final : public Runnable
 {
 public:
   CheckPrincipalWithCallbackRunnable(already_AddRefed<ContentParent> aParent,
                                      const PrincipalInfo& aPrincipalInfo,
-                                     nsRunnable* aCallback)
+                                     Runnable* aCallback)
     : mContentParent(aParent)
     , mPrincipalInfo(aPrincipalInfo)
     , mCallback(aCallback)
     , mBackgroundThread(NS_GetCurrentThread())
   {
     AssertIsInMainProcess();
     AssertIsOnBackgroundThread();
 
@@ -141,17 +141,17 @@ public:
     mCallback = nullptr;
 
     return NS_OK;
   }
 
 private:
   RefPtr<ContentParent> mContentParent;
   PrincipalInfo mPrincipalInfo;
-  RefPtr<nsRunnable> mCallback;
+  RefPtr<Runnable> mCallback;
   nsCOMPtr<nsIThread> mBackgroundThread;
 };
 
 } // namespace
 
 ServiceWorkerManagerParent::ServiceWorkerManagerParent()
   : mService(ServiceWorkerManagerService::GetOrCreate())
   , mID(++sServiceWorkerManagerParentID)
--- a/dom/workers/ServiceWorkerManagerService.cpp
+++ b/dom/workers/ServiceWorkerManagerService.cpp
@@ -29,17 +29,17 @@ struct NotifySoftUpdateData
   RefPtr<ContentParent> mContentParent;
 
   ~NotifySoftUpdateData()
   {
     MOZ_ASSERT(!mContentParent);
   }
 };
 
-class NotifySoftUpdateIfPrincipalOkRunnable final : public nsRunnable
+class NotifySoftUpdateIfPrincipalOkRunnable final : public Runnable
 {
 public:
   NotifySoftUpdateIfPrincipalOkRunnable(
       nsAutoPtr<nsTArray<NotifySoftUpdateData>>& aData,
       const PrincipalOriginAttributes& aOriginAttributes,
       const nsAString& aScope)
     : mData(aData)
     , mOriginAttributes(aOriginAttributes)
--- a/dom/workers/ServiceWorkerPrivate.cpp
+++ b/dom/workers/ServiceWorkerPrivate.cpp
@@ -235,17 +235,17 @@ public:
     MOZ_ASSERT(workerPrivate);
     workerPrivate->AssertIsOnWorkerThread();
 #endif
   }
 };
 
 NS_IMPL_ISUPPORTS0(KeepAliveHandler)
 
-class RegistrationUpdateRunnable : public nsRunnable
+class RegistrationUpdateRunnable : public Runnable
 {
   nsMainThreadPtrHandle<ServiceWorkerRegistrationInfo> mRegistration;
   const bool mNeedTimeCheck;
 
 public:
   RegistrationUpdateRunnable(nsMainThreadPtrHandle<ServiceWorkerRegistrationInfo>& aRegistration,
                              bool aNeedTimeCheck)
     : mRegistration(aRegistration)
@@ -1273,17 +1273,17 @@ public:
     }
     WorkerRunnable::Cancel();
     return NS_OK;
   }
 
 private:
   ~FetchEventRunnable() {}
 
-  class ResumeRequest final : public nsRunnable {
+  class ResumeRequest final : public Runnable {
     nsMainThreadPtrHandle<nsIInterceptedChannel> mChannel;
   public:
     explicit ResumeRequest(nsMainThreadPtrHandle<nsIInterceptedChannel>& aChannel)
       : mChannel(aChannel)
     {
     }
 
     NS_IMETHOD Run()
--- a/dom/workers/ServiceWorkerPrivate.h
+++ b/dom/workers/ServiceWorkerPrivate.h
@@ -16,17 +16,17 @@ class nsIInterceptedChannel;
 namespace mozilla {
 namespace dom {
 namespace workers {
 
 class ServiceWorkerInfo;
 class ServiceWorkerRegistrationInfo;
 class KeepAliveToken;
 
-class LifeCycleEventCallback : public nsRunnable
+class LifeCycleEventCallback : public Runnable
 {
 public:
   // Called on the worker thread.
   virtual void
   SetResult(bool aResult) = 0;
 };
 
 // ServiceWorkerPrivate is a wrapper for managing the on-demand aspect of
--- a/dom/workers/ServiceWorkerRegistrar.cpp
+++ b/dom/workers/ServiceWorkerRegistrar.cpp
@@ -1,8 +1,9 @@
+
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ServiceWorkerRegistrar.h"
 #include "mozilla/dom/ServiceWorkerRegistrarTypes.h"
@@ -516,34 +517,34 @@ ServiceWorkerRegistrar::RegisterServiceW
     }
   }
 
   if (!found) {
     mData.AppendElement(aData);
   }
 }
 
-class ServiceWorkerRegistrarSaveDataRunnable final : public nsRunnable
+class ServiceWorkerRegistrarSaveDataRunnable final : public Runnable
 {
 public:
   ServiceWorkerRegistrarSaveDataRunnable()
     : mThread(do_GetCurrentThread())
   {
     AssertIsOnBackgroundThread();
   }
 
   NS_IMETHODIMP
   Run()
   {
     RefPtr<ServiceWorkerRegistrar> service = ServiceWorkerRegistrar::Get();
     MOZ_ASSERT(service);
 
     service->SaveData();
 
-    RefPtr<nsRunnable> runnable =
+    RefPtr<Runnable> runnable =
       NS_NewRunnableMethod(service, &ServiceWorkerRegistrar::DataSaved);
     nsresult rv = mThread->Dispatch(runnable, NS_DISPATCH_NORMAL);
     if (NS_WARN_IF(NS_FAILED(rv))) {
       return rv;
     }
 
     return NS_OK;
   }
@@ -557,17 +558,17 @@ ServiceWorkerRegistrar::ScheduleSaveData
 {
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(!mShuttingDown);
 
   nsCOMPtr<nsIEventTarget> target =
     do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID);
   MOZ_ASSERT(target, "Must have stream transport service");
 
-  RefPtr<nsRunnable> runnable =
+  RefPtr<Runnable> runnable =
     new ServiceWorkerRegistrarSaveDataRunnable();
   nsresult rv = target->Dispatch(runnable, NS_DISPATCH_NORMAL);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return;
   }
 
   ++mRunnableCounter;
 }
@@ -607,17 +608,17 @@ void
 ServiceWorkerRegistrar::MaybeScheduleShutdownCompleted()
 {
   AssertIsOnBackgroundThread();
 
   if (mRunnableCounter || !mShuttingDown) {
     return;
   }
 
-  RefPtr<nsRunnable> runnable =
+  RefPtr<Runnable> runnable =
      NS_NewRunnableMethod(this, &ServiceWorkerRegistrar::ShutdownCompleted);
   nsresult rv = NS_DispatchToMainThread(runnable);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return;
   }
 }
 
 bool
--- a/dom/workers/ServiceWorkerRegistration.cpp
+++ b/dom/workers/ServiceWorkerRegistration.cpp
@@ -390,17 +390,17 @@ public:
     }
 
     RefPtr<UpdateResultRunnable> r =
       new UpdateResultRunnable(proxy, aStatus);
     r->Dispatch();
   }
 };
 
-class UpdateRunnable final : public nsRunnable
+class UpdateRunnable final : public Runnable
 {
 public:
   UpdateRunnable(PromiseWorkerProxy* aPromiseProxy,
                  const nsAString& aScope)
     : mPromiseProxy(aPromiseProxy)
     , mScope(aScope)
   {}
 
@@ -558,17 +558,17 @@ private:
 };
 
 NS_IMPL_ISUPPORTS(WorkerUnregisterCallback, nsIServiceWorkerUnregisterCallback);
 
 /*
  * If the worker goes away, we still continue to unregister, but we don't try to
  * resolve the worker Promise (which doesn't exist by that point).
  */
-class StartUnregisterRunnable final : public nsRunnable
+class StartUnregisterRunnable final : public Runnable
 {
   RefPtr<PromiseWorkerProxy> mPromiseWorkerProxy;
   const nsString mScope;
 
 public:
   StartUnregisterRunnable(PromiseWorkerProxy* aProxy,
                           const nsAString& aScope)
     : mPromiseWorkerProxy(aProxy)
@@ -1016,17 +1016,17 @@ ServiceWorkerRegistrationWorkerThread::U
   }
 
   RefPtr<StartUnregisterRunnable> r = new StartUnregisterRunnable(proxy, mScope);
   MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(r));
 
   return promise.forget();
 }
 
-class StartListeningRunnable final : public nsRunnable
+class StartListeningRunnable final : public Runnable
 {
   RefPtr<WorkerListener> mListener;
 public:
   explicit StartListeningRunnable(WorkerListener* aListener)
     : mListener(aListener)
   {}
 
   NS_IMETHOD
@@ -1052,17 +1052,17 @@ ServiceWorkerRegistrationWorkerThread::I
     return;
   }
 
   RefPtr<StartListeningRunnable> r =
     new StartListeningRunnable(mListener);
   MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(r));
 }
 
-class AsyncStopListeningRunnable final : public nsRunnable
+class AsyncStopListeningRunnable final : public Runnable
 {
   RefPtr<WorkerListener> mListener;
 public:
   explicit AsyncStopListeningRunnable(WorkerListener* aListener)
     : mListener(aListener)
   {}
 
   NS_IMETHOD
--- a/dom/workers/ServiceWorkerWindowClient.cpp
+++ b/dom/workers/ServiceWorkerWindowClient.cpp
@@ -67,17 +67,17 @@ public:
 
     // Release the reference on the worker thread.
     mPromiseProxy->CleanUp();
 
     return true;
   }
 };
 
-class ClientFocusRunnable final : public nsRunnable
+class ClientFocusRunnable final : public Runnable
 {
   uint64_t mWindowId;
   RefPtr<PromiseWorkerProxy> mPromiseProxy;
 
 public:
   ClientFocusRunnable(uint64_t aWindowId, PromiseWorkerProxy* aPromiseProxy)
     : mWindowId(aWindowId)
     , mPromiseProxy(aPromiseProxy)
--- a/dom/workers/URL.cpp
+++ b/dom/workers/URL.cpp
@@ -278,17 +278,17 @@ public:
 
   URLProxy*
   GetURLProxy()
   {
     return mRetval;
   }
 };
 
-class TeardownURLRunnable : public nsRunnable
+class TeardownURLRunnable : public Runnable
 {
 public:
   explicit TeardownURLRunnable(URLProxy* aURLProxy)
     : mURLProxy(aURLProxy)
   {
   }
 
   NS_IMETHOD Run()
--- a/dom/workers/WorkerDebuggerManager.cpp
+++ b/dom/workers/WorkerDebuggerManager.cpp
@@ -11,17 +11,17 @@
 #include "mozilla/ClearOnShutdown.h"
 
 #include "WorkerPrivate.h"
 
 USING_WORKERS_NAMESPACE
 
 namespace {
 
-class RegisterDebuggerMainThreadRunnable final : public nsRunnable
+class RegisterDebuggerMainThreadRunnable final : public mozilla::Runnable
 {
   WorkerPrivate* mWorkerPrivate;
   bool mNotifyListeners;
 
 public:
   RegisterDebuggerMainThreadRunnable(WorkerPrivate* aWorkerPrivate,
                                      bool aNotifyListeners)
   : mWorkerPrivate(aWorkerPrivate),
@@ -38,17 +38,17 @@ private:
     WorkerDebuggerManager* manager = WorkerDebuggerManager::Get();
     MOZ_ASSERT(manager);
 
     manager->RegisterDebuggerMainThread(mWorkerPrivate, mNotifyListeners);
     return NS_OK;
   }
 };
 
-class UnregisterDebuggerMainThreadRunnable final : public nsRunnable
+class UnregisterDebuggerMainThreadRunnable final : public mozilla::Runnable
 {
   WorkerPrivate* mWorkerPrivate;
 
 public:
   explicit UnregisterDebuggerMainThreadRunnable(WorkerPrivate* aWorkerPrivate)
   : mWorkerPrivate(aWorkerPrivate)
   { }
 
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -324,17 +324,17 @@ LogErrorToConsole(const nsAString& aMess
   __android_log_print(ANDROID_LOG_INFO, "Gecko", kErrorString, msg.get(),
                       filename.get(), aLineNumber);
 #endif
 
   fprintf(stderr, kErrorString, msg.get(), filename.get(), aLineNumber);
   fflush(stderr);
 }
 
-class MainThreadReleaseRunnable final : public nsRunnable
+class MainThreadReleaseRunnable final : public Runnable
 {
   nsTArray<nsCOMPtr<nsISupports>> mDoomed;
   nsCOMPtr<nsILoadGroup> mLoadGroupToCancel;
 
 public:
   MainThreadReleaseRunnable(nsTArray<nsCOMPtr<nsISupports>>& aDoomed,
                             nsCOMPtr<nsILoadGroup>& aLoadGroupToCancel)
   {
@@ -408,17 +408,17 @@ private:
 
     runtime->UnregisterWorker(mFinishedWorker);
 
     mFinishedWorker->ClearSelfRef();
     return true;
   }
 };
 
-class TopLevelWorkerFinishedRunnable final : public nsRunnable
+class TopLevelWorkerFinishedRunnable final : public Runnable
 {
   WorkerPrivate* mFinishedWorker;
 
 public:
   explicit TopLevelWorkerFinishedRunnable(WorkerPrivate* aFinishedWorker)
   : mFinishedWorker(aFinishedWorker)
   {
     aFinishedWorker->AssertIsOnWorkerThread();
@@ -1770,19 +1770,19 @@ PRThreadFromThread(nsIThread* aThread)
   MOZ_ALWAYS_SUCCEEDS(aThread->GetPRThread(&result));
   MOZ_ASSERT(result);
 
   return result;
 }
 
 } /* anonymous namespace */
 
-NS_IMPL_ISUPPORTS_INHERITED0(MainThreadReleaseRunnable, nsRunnable)
-
-NS_IMPL_ISUPPORTS_INHERITED0(TopLevelWorkerFinishedRunnable, nsRunnable)
+NS_IMPL_ISUPPORTS_INHERITED0(MainThreadReleaseRunnable, Runnable)
+
+NS_IMPL_ISUPPORTS_INHERITED0(TopLevelWorkerFinishedRunnable, Runnable)
 
 TimerThreadEventTarget::TimerThreadEventTarget(WorkerPrivate* aWorkerPrivate,
                                                WorkerRunnable* aWorkerRunnable)
   : mWorkerPrivate(aWorkerPrivate), mWorkerRunnable(aWorkerRunnable)
 {
   MOZ_ASSERT(aWorkerPrivate);
   MOZ_ASSERT(aWorkerRunnable);
 }
@@ -3642,17 +3642,17 @@ WorkerPrivateParent<Derived>::AssertInne
 
   nsPIDOMWindowOuter* outer = mLoadInfo.mWindow->GetOuterWindow();
   NS_ASSERTION(outer && outer->GetCurrentInnerWindow() == mLoadInfo.mWindow,
                "Inner window no longer correct!");
 }
 
 #endif
 
-class PostDebuggerMessageRunnable final : public nsRunnable
+class PostDebuggerMessageRunnable final : public Runnable
 {
   WorkerDebugger *mDebugger;
   nsString mMessage;
 
 public:
   PostDebuggerMessageRunnable(WorkerDebugger* aDebugger,
                               const nsAString& aMessage)
   : mDebugger(aDebugger),
@@ -3668,17 +3668,17 @@ private:
   Run() override
   {
     mDebugger->PostMessageToDebuggerOnMainThread(mMessage);
 
     return NS_OK;
   }
 };
 
-class ReportDebuggerErrorRunnable final : public nsRunnable
+class ReportDebuggerErrorRunnable final : public Runnable
 {
   WorkerDebugger *mDebugger;
   nsString mFilename;
   uint32_t mLineno;
   nsString mMessage;
 
 public:
   ReportDebuggerErrorRunnable(WorkerDebugger* aDebugger,
--- a/dom/workers/WorkerRunnable.h
+++ b/dom/workers/WorkerRunnable.h
@@ -419,17 +419,17 @@ protected:
   // We just delegate PostRun to WorkerRunnable, since it does exactly
   // what we want.
 };
 
 // Base class for the runnable objects, which makes a synchronous call to
 // dispatch the tasks from the worker thread to the main thread.
 //
 // Note that the derived class must override MainThreadRun.
-class WorkerMainThreadRunnable : public nsRunnable
+class WorkerMainThreadRunnable : public Runnable
 {
 protected:
   WorkerPrivate* mWorkerPrivate;
   nsCOMPtr<nsIEventTarget> mSyncLoopTarget;
 
   explicit WorkerMainThreadRunnable(WorkerPrivate* aWorkerPrivate);
   ~WorkerMainThreadRunnable() {}
 
--- a/dom/workers/WorkerScope.cpp
+++ b/dom/workers/WorkerScope.cpp
@@ -580,17 +580,17 @@ public:
 
     // Release the reference on the worker thread.
     mPromiseProxy->CleanUp();
 
     return true;
   }
 };
 
-class WorkerScopeSkipWaitingRunnable final : public nsRunnable
+class WorkerScopeSkipWaitingRunnable final : public Runnable
 {
   RefPtr<PromiseWorkerProxy> mPromiseProxy;
   nsCString mScope;
 
 public:
   WorkerScopeSkipWaitingRunnable(PromiseWorkerProxy* aPromiseProxy,
                                  const nsCString& aScope)
     : mPromiseProxy(aPromiseProxy)
--- a/dom/workers/XMLHttpRequest.cpp
+++ b/dom/workers/XMLHttpRequest.cpp
@@ -181,17 +181,17 @@ private:
   ~Proxy()
   {
     MOZ_ASSERT(!mXHR);
     MOZ_ASSERT(!mXHRUpload);
     MOZ_ASSERT(!mOutstandingSendCount);
   }
 };
 
-class WorkerThreadProxySyncRunnable : public nsRunnable
+class WorkerThreadProxySyncRunnable : public Runnable
 {
 protected:
   WorkerPrivate* mWorkerPrivate;
   RefPtr<Proxy> mProxy;
   nsCOMPtr<nsIEventTarget> mSyncLoopTarget;
 
 private:
   // mRv is set on the worker thread by the constructor.  Must not be touched on
@@ -236,18 +236,16 @@ public:
                                 ErrorResult& aRv)
   : mWorkerPrivate(aWorkerPrivate), mProxy(aProxy), mRv(aRv)
   {
     MOZ_ASSERT(aWorkerPrivate);
     MOZ_ASSERT(aProxy);
     aWorkerPrivate->AssertIsOnWorkerThread();
   }
 
-  NS_DECL_ISUPPORTS_INHERITED
-
   void
   Dispatch()
   {
     mWorkerPrivate->AssertIsOnWorkerThread();
 
     AutoSyncLoopHolder syncLoop(mWorkerPrivate);
     mSyncLoopTarget = syncLoop.EventTarget();
 
@@ -417,29 +415,27 @@ private:
     if (mXMLHttpRequestPrivate->SendInProgress()) {
       mXMLHttpRequestPrivate->Unpin();
     }
 
     return true;
   }
 };
 
-class AsyncTeardownRunnable final : public nsRunnable
+class AsyncTeardownRunnable final : public Runnable
 {
   RefPtr<Proxy> mProxy;
 
 public:
   explicit AsyncTeardownRunnable(Proxy* aProxy)
   : mProxy(aProxy)
   {
     MOZ_ASSERT(aProxy);
   }
 
-  NS_DECL_ISUPPORTS_INHERITED
-
 private:
   ~AsyncTeardownRunnable()
   { }
 
   NS_IMETHOD
   Run() override
   {
     AssertIsOnMainThread();
@@ -448,17 +444,17 @@ private:
     // try to unpin.
     mProxy->Teardown(/* aSendUnpin */ false);
     mProxy = nullptr;
 
     return NS_OK;
   }
 };
 
-class LoadStartDetectionRunnable final : public nsRunnable,
+class LoadStartDetectionRunnable final : public Runnable,
                                          public nsIDOMEventListener
 {
   WorkerPrivate* mWorkerPrivate;
   RefPtr<Proxy> mProxy;
   RefPtr<nsXMLHttpRequest> mXHR;
   XMLHttpRequest* mXMLHttpRequestPrivate;
   nsString mEventType;
   uint32_t mChannelId;
@@ -1122,21 +1118,17 @@ Proxy::HandleEvent(nsIDOMEvent* aEvent)
         NS_WARNING("Failed to dispatch LoadStartDetectionRunnable!");
       }
     }
   }
 
   return NS_OK;
 }
 
-NS_IMPL_ISUPPORTS_INHERITED0(WorkerThreadProxySyncRunnable, nsRunnable)
-
-NS_IMPL_ISUPPORTS_INHERITED0(AsyncTeardownRunnable, nsRunnable)
-
-NS_IMPL_ISUPPORTS_INHERITED(LoadStartDetectionRunnable, nsRunnable,
+NS_IMPL_ISUPPORTS_INHERITED(LoadStartDetectionRunnable, Runnable,
                                                         nsIDOMEventListener)
 
 NS_IMETHODIMP
 LoadStartDetectionRunnable::Run()
 {
   AssertIsOnMainThread();
 
   if (NS_FAILED(mXHR->RemoveEventListener(mEventType, this, false))) {
--- a/dom/xslt/xslt/txMozillaXSLTProcessor.cpp
+++ b/dom/xslt/xslt/txMozillaXSLTProcessor.cpp
@@ -533,17 +533,17 @@ txMozillaXSLTProcessor::AddXSLTParam(con
     }
 
     var = new txVariable(value);
     NS_ENSURE_TRUE(var, NS_ERROR_OUT_OF_MEMORY);
 
     return mVariables.add(varName, var);
 }
 
-class nsTransformBlockerEvent : public nsRunnable {
+class nsTransformBlockerEvent : public mozilla::Runnable {
 public:
   RefPtr<txMozillaXSLTProcessor> mProcessor;
 
   explicit nsTransformBlockerEvent(txMozillaXSLTProcessor* processor)
     : mProcessor(processor)
   {}
 
   ~nsTransformBlockerEvent()
--- a/dom/xul/nsXULElement.cpp
+++ b/dom/xul/nsXULElement.cpp
@@ -805,17 +805,17 @@ IsInFeedSubscribeLine(nsXULElement* aEle
     if (idAtom && idAtom->Equals(NS_LITERAL_STRING("feedSubscribeLine"))) {
       return true;
     }
   }
   return false;
 }
 #endif
 
-class XULInContentErrorReporter : public nsRunnable
+class XULInContentErrorReporter : public Runnable
 {
 public:
   explicit XULInContentErrorReporter(nsIDocument* aDocument) : mDocument(aDocument) {}
 
   NS_IMETHOD Run()
   {
     mDocument->WarnOnceAbout(nsIDocument::eImportXULIntoContent, false);
     return NS_OK;
@@ -1963,17 +1963,17 @@ void
 nsXULElement::SetTitlebarColor(nscolor aColor, bool aActive)
 {
     nsIWidget* mainWidget = GetWindowWidget();
     if (mainWidget) {
         mainWidget->SetWindowTitlebarColor(aColor, aActive);
     }
 }
 
-class SetDrawInTitleBarEvent : public nsRunnable
+class SetDrawInTitleBarEvent : public Runnable
 {
 public:
   SetDrawInTitleBarEvent(nsIWidget* aWidget, bool aState)
     : mWidget(aWidget)
     , mState(aState)
   {}
 
   NS_IMETHOD Run() {
@@ -2019,17 +2019,17 @@ nsXULElement::UpdateBrightTitlebarForegr
           aDoc->GetDocumentLWTheme() == nsIDocument::Doc_Theme_Bright ||
           aDoc->GetRootElement()->AttrValueIs(kNameSpaceID_None,
                                               nsGkAtoms::brighttitlebarforeground,
                                               NS_LITERAL_STRING("true"),
                                               eCaseMatters));
     }
 }
 
-class MarginSetter : public nsRunnable
+class MarginSetter : public Runnable
 {
 public:
     explicit MarginSetter(nsIWidget* aWidget) :
         mWidget(aWidget), mMargin(-1, -1, -1, -1)
     {}
     MarginSetter(nsIWidget *aWidget, const LayoutDeviceIntMargin& aMargin) :
         mWidget(aWidget), mMargin(aMargin)
     {}
@@ -2710,17 +2710,17 @@ nsXULPrototypeScript::DeserializeOutOfLi
                 if (rv != NS_ERROR_NOT_AVAILABLE)
                     cache->AbortCaching();
             }
         }
     }
     return rv;
 }
 
-class NotifyOffThreadScriptCompletedRunnable : public nsRunnable
+class NotifyOffThreadScriptCompletedRunnable : public Runnable
 {
     // An array of all outstanding script receivers. All reference counting of
     // these objects happens on the main thread. When we return to the main
     // thread from script compilation we make sure our receiver is still in
     // this array (still alive) before proceeding. This array is cleared during
     // shutdown, potentially before all outstanding script compilations have
     // finished. We do not need to worry about pointer replay here, because
     // a) we should not be starting script compilation after clearing this
--- a/editor/composer/nsEditorSpellCheck.cpp
+++ b/editor/composer/nsEditorSpellCheck.cpp
@@ -291,17 +291,17 @@ nsEditorSpellCheck::CanSpellCheck(bool* 
   rv = spellChecker->GetDictionaryList(&dictList);
   NS_ENSURE_SUCCESS(rv, rv);
 
   *_retval = (dictList.Length() > 0);
   return NS_OK;
 }
 
 // Instances of this class can be used as either runnables or RAII helpers.
-class CallbackCaller final : public nsRunnable
+class CallbackCaller final : public Runnable
 {
 public:
   explicit CallbackCaller(nsIEditorSpellCheckCallback* aCallback)
     : mCallback(aCallback) {}
 
   ~CallbackCaller()
   {
     Run();
--- a/editor/libeditor/nsEditor.cpp
+++ b/editor/libeditor/nsEditor.cpp
@@ -1745,17 +1745,17 @@ nsEditor::RemoveEditorObserver(nsIEditor
 {
   NS_ENSURE_TRUE(aObserver, NS_ERROR_FAILURE);
 
   mEditorObservers.RemoveElement(aObserver);
 
   return NS_OK;
 }
 
-class EditorInputEventDispatcher : public nsRunnable
+class EditorInputEventDispatcher : public Runnable
 {
 public:
   EditorInputEventDispatcher(nsEditor* aEditor,
                              nsIContent* aTarget,
                              bool aIsComposing)
     : mEditor(aEditor)
     , mTarget(aTarget)
     , mIsComposing(aIsComposing)
--- a/extensions/gio/nsGIOProtocolHandler.cpp
+++ b/extensions/gio/nsGIOProtocolHandler.cpp
@@ -537,17 +537,17 @@ nsGIOInputStream::DoRead(char *aBuf, uin
     }
   }
   return rv;
 }
 
 /**
  * This class is used to implement SetContentTypeOfChannel.
  */
-class nsGIOSetContentTypeEvent : public nsRunnable
+class nsGIOSetContentTypeEvent : public mozilla::Runnable
 {
   public:
     nsGIOSetContentTypeEvent(nsIChannel *channel, const char *contentType)
       : mChannel(channel), mContentType(contentType)
     {
       // stash channel reference in mChannel.  no AddRef here!  see note
       // in SetContentTypeOfchannel.
     }
--- a/extensions/spellcheck/src/mozInlineSpellChecker.cpp
+++ b/extensions/spellcheck/src/mozInlineSpellChecker.cpp
@@ -467,17 +467,17 @@ mozInlineSpellStatus::PositionToCollapse
   NS_ENSURE_SUCCESS(rv, rv);
 
   range.swap(*aRange);
   return NS_OK;
 }
 
 // mozInlineSpellResume
 
-class mozInlineSpellResume : public nsRunnable
+class mozInlineSpellResume : public Runnable
 {
 public:
   mozInlineSpellResume(const mozInlineSpellStatus& aStatus,
                        uint32_t aDisabledAsyncToken)
     : mDisabledAsyncToken(aDisabledAsyncToken), mStatus(aStatus) {}
 
   nsresult Post()
   {
--- a/extensions/spellcheck/src/mozPersonalDictionary.cpp
+++ b/extensions/spellcheck/src/mozPersonalDictionary.cpp
@@ -48,17 +48,17 @@ NS_INTERFACE_MAP_BEGIN(mozPersonalDictio
   NS_INTERFACE_MAP_ENTRY(nsIObserver)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, mozIPersonalDictionary)
   NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(mozPersonalDictionary)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTION(mozPersonalDictionary, mEncoder)
 
-class mozPersonalDictionaryLoader final : public nsRunnable
+class mozPersonalDictionaryLoader final : public mozilla::Runnable
 {
 public:
   explicit mozPersonalDictionaryLoader(mozPersonalDictionary *dict) : mDict(dict)
   {
   }
 
   NS_IMETHOD Run() override
   {
@@ -69,17 +69,17 @@ public:
 
     return NS_OK;
   }
 
 private:
   RefPtr<mozPersonalDictionary> mDict;
 };
 
-class mozPersonalDictionarySave final : public nsRunnable
+class mozPersonalDictionarySave final : public mozilla::Runnable
 {
 public:
   explicit mozPersonalDictionarySave(mozPersonalDictionary *aDict,
                                      nsCOMPtr<nsIFile> aFile,
                                      nsTArray<nsString> &&aDictWords)
     : mDictWords(aDictWords),
       mFile(aFile),
       mDict(aDict)
--- a/gfx/layers/AsyncCanvasRenderer.cpp
+++ b/gfx/layers/AsyncCanvasRenderer.cpp
@@ -39,17 +39,17 @@ AsyncCanvasRenderer::AsyncCanvasRenderer
 AsyncCanvasRenderer::~AsyncCanvasRenderer()
 {
   MOZ_COUNT_DTOR(AsyncCanvasRenderer);
 }
 
 void
 AsyncCanvasRenderer::NotifyElementAboutAttributesChanged()
 {
-  class Runnable final : public nsRunnable
+  class Runnable final : public mozilla::Runnable
   {
   public:
     explicit Runnable(AsyncCanvasRenderer* aRenderer)
       : mRenderer(aRenderer)
     {}
 
     NS_IMETHOD Run()
     {
@@ -64,27 +64,27 @@ AsyncCanvasRenderer::NotifyElementAboutA
     {
       mRenderer = nullptr;
     }
 
   private:
     RefPtr<AsyncCanvasRenderer> mRenderer;
   };
 
-  RefPtr<nsRunnable> runnable = new Runnable(this);
+  nsCOMPtr<nsIRunnable> runnable = new Runnable(this);
   nsresult rv = NS_DispatchToMainThread(runnable);
   if (NS_FAILED(rv)) {
     NS_WARNING("Failed to dispatch a runnable to the main-thread.");
   }
 }
 
 void
 AsyncCanvasRenderer::NotifyElementAboutInvalidation()
 {
-  class Runnable final : public nsRunnable
+  class Runnable final : public mozilla::Runnable
   {
   public:
     explicit Runnable(AsyncCanvasRenderer* aRenderer)
       : mRenderer(aRenderer)
     {}
 
     NS_IMETHOD Run()
     {
@@ -99,17 +99,17 @@ AsyncCanvasRenderer::NotifyElementAboutI
     {
       mRenderer = nullptr;
     }
 
   private:
     RefPtr<AsyncCanvasRenderer> mRenderer;
   };
 
-  RefPtr<nsRunnable> runnable = new Runnable(this);
+  nsCOMPtr<nsIRunnable> runnable = new Runnable(this);
   nsresult rv = NS_DispatchToMainThread(runnable);
   if (NS_FAILED(rv)) {
     NS_WARNING("Failed to dispatch a runnable to the main-thread.");
   }
 }
 
 void
 AsyncCanvasRenderer::SetCanvasClient(CanvasClient* aClient)
--- a/gfx/layers/ImageContainer.h
+++ b/gfx/layers/ImageContainer.h
@@ -51,17 +51,17 @@ class nsMainThreadSourceSurfaceRef;
 template <>
 class nsAutoRefTraits<nsMainThreadSourceSurfaceRef> {
 public:
   typedef mozilla::gfx::SourceSurface* RawRef;
 
   /**
    * The XPCOM event that will do the actual release on the main thread.
    */
-  class SurfaceReleaser : public nsRunnable {
+  class SurfaceReleaser : public mozilla::Runnable {
   public:
     explicit SurfaceReleaser(RawRef aRef) : mRef(aRef) {}
     NS_IMETHOD Run() {
       mRef->Release();
       return NS_OK;
     }
     RawRef mRef;
   };
@@ -89,17 +89,17 @@ class nsOwningThreadSourceSurfaceRef;
 template <>
 class nsAutoRefTraits<nsOwningThreadSourceSurfaceRef> {
 public:
   typedef mozilla::gfx::SourceSurface* RawRef;
 
   /**
    * The XPCOM event that will do the actual release on the creation thread.
    */
-  class SurfaceReleaser : public nsRunnable {
+  class SurfaceReleaser : public mozilla::Runnable {
   public:
     explicit SurfaceReleaser(RawRef aRef) : mRef(aRef) {}
     NS_IMETHOD Run() {
       mRef->Release();
       return NS_OK;
     }
     RawRef mRef;
   };
--- a/gfx/layers/LayerScope.cpp
+++ b/gfx/layers/LayerScope.cpp
@@ -337,17 +337,17 @@ public:
     }
 
     LayerScopeManager()
         : mScale(1.0)
     {
     }
 private:
     friend class CreateServerSocketRunnable;
-    class CreateServerSocketRunnable : public nsRunnable
+    class CreateServerSocketRunnable : public Runnable
     {
     public:
         explicit CreateServerSocketRunnable(LayerScopeManager *aLayerScopeManager)
             : mLayerScopeManager(aLayerScopeManager)
         {
         }
         NS_IMETHOD Run() {
             mLayerScopeManager->mWebSocketManager =
--- a/gfx/layers/apz/util/APZCCallbackHelper.cpp
+++ b/gfx/layers/apz/util/APZCCallbackHelper.cpp
@@ -325,28 +325,28 @@ APZCCallbackHelper::InitializeRootDispla
     // nsRootBoxFrame::BuildDisplayList.
     nsLayoutUtils::SetDisplayPortMargins(content, aPresShell, ScreenMargin(), 0,
         nsLayoutUtils::RepaintMode::DoNotRepaint);
     nsLayoutUtils::SetZeroMarginDisplayPortOnAsyncScrollableAncestors(
         content->GetPrimaryFrame(), nsLayoutUtils::RepaintMode::DoNotRepaint);
   }
 }
 
-class AcknowledgeScrollUpdateEvent : public nsRunnable
+class AcknowledgeScrollUpdateEvent : public Runnable
 {
     typedef mozilla::layers::FrameMetrics::ViewID ViewID;
 
 public:
     AcknowledgeScrollUpdateEvent(const ViewID& aScrollId, const uint32_t& aScrollGeneration)
         : mScrollId(aScrollId)
         , mScrollGeneration(aScrollGeneration)
     {
     }
 
-    NS_IMETHOD Run() {
+    NS_IMETHOD Run() override {
         MOZ_ASSERT(NS_IsMainThread());
 
         nsIScrollableFrame* sf = nsLayoutUtils::FindScrollableFrameFor(mScrollId);
         if (sf) {
             sf->ResetScrollInfoIfGeneration(mScrollGeneration);
         }
 
         // Since the APZ and content are in sync, we need to clear any callback transform
--- a/gfx/layers/ipc/ThreadSafeRefcountingWithMainThreadDestruction.h
+++ b/gfx/layers/ipc/ThreadSafeRefcountingWithMainThreadDestruction.h
@@ -34,17 +34,17 @@ struct HelperForMainThreadDestruction
 
   ~HelperForMainThreadDestruction()
   {
     MOZ_ASSERT(NS_IsMainThread());
   }
 };
 
 template<typename T>
-struct DeleteOnMainThreadTask: public nsRunnable
+struct DeleteOnMainThreadTask : public Runnable
 {
   T* mToDelete;
   explicit DeleteOnMainThreadTask(T* aToDelete) : mToDelete(aToDelete) {}
   NS_IMETHOD Run() {
     MOZ_ASSERT(NS_IsMainThread());
     mToDelete->DeleteToBeCalledOnMainThread();
     return NS_OK;
   }
--- a/gfx/src/gfxCrashReporterUtils.cpp
+++ b/gfx/src/gfxCrashReporterUtils.cpp
@@ -60,17 +60,17 @@ ObserverToDestroyFeaturesAlreadyReported
     if (gFeaturesAlreadyReported) {
       delete gFeaturesAlreadyReported;
       gFeaturesAlreadyReported = nullptr;
     }
   }
   return NS_OK;
 }
 
-class RegisterObserverRunnable : public nsRunnable {
+class RegisterObserverRunnable : public Runnable {
 public:
   NS_IMETHOD Run() override {
     // LeakLog made me do this. Basically, I just wanted gFeaturesAlreadyReported to be a static nsTArray<nsCString>,
     // and LeakLog was complaining about leaks like this:
     //    leaked 1 instance of nsTArray_base with size 8 bytes
     //    leaked 7 instances of nsStringBuffer with size 8 bytes each (56 bytes total)
     // So this is a work-around using a pointer, and using a nsIObserver to deallocate on xpcom shutdown.
     // Yay for fighting bloat.
--- a/gfx/thebes/gfxFontInfoLoader.cpp
+++ b/gfx/thebes/gfxFontInfoLoader.cpp
@@ -34,90 +34,90 @@ FontInfoData::Load()
                 "Exception occurred reading font data for " <<
                 NS_ConvertUTF16toUTF8(mFontFamiliesToLoad[i]).get();
         }
     }
 
     mLoadTime = TimeStamp::Now() - start;
 }
 
-class FontInfoLoadCompleteEvent : public nsRunnable {
+class FontInfoLoadCompleteEvent : public Runnable {
     virtual ~FontInfoLoadCompleteEvent() {}
 
     NS_DECL_ISUPPORTS_INHERITED
 
     explicit FontInfoLoadCompleteEvent(FontInfoData *aFontInfo) :
         mFontInfo(aFontInfo)
     {}
 
     NS_IMETHOD Run() override;
 
     RefPtr<FontInfoData> mFontInfo;
 };
 
-class AsyncFontInfoLoader : public nsRunnable {
+class AsyncFontInfoLoader : public Runnable {
     virtual ~AsyncFontInfoLoader() {}
 
     NS_DECL_ISUPPORTS_INHERITED
 
     explicit AsyncFontInfoLoader(FontInfoData *aFontInfo) :
         mFontInfo(aFontInfo)
     {
         mCompleteEvent = new FontInfoLoadCompleteEvent(aFontInfo);
     }
 
     NS_IMETHOD Run() override;
 
     RefPtr<FontInfoData> mFontInfo;
     RefPtr<FontInfoLoadCompleteEvent> mCompleteEvent;
 };
 
-class ShutdownThreadEvent : public nsRunnable {
+class ShutdownThreadEvent : public Runnable {
     virtual ~ShutdownThreadEvent() {}
 
     NS_DECL_ISUPPORTS_INHERITED
 
     explicit ShutdownThreadEvent(nsIThread* aThread) : mThread(aThread) {}
     NS_IMETHOD Run() override {
         mThread->Shutdown();
         return NS_OK;
     }
     nsCOMPtr<nsIThread> mThread;
 };
 
-NS_IMPL_ISUPPORTS_INHERITED0(ShutdownThreadEvent, nsRunnable);
+NS_IMPL_ISUPPORTS_INHERITED0(ShutdownThreadEvent, Runnable);
 
 // runs on main thread after async font info loading is done
 nsresult
 FontInfoLoadCompleteEvent::Run()
 {
     gfxFontInfoLoader *loader =
         static_cast<gfxFontInfoLoader*>(gfxPlatformFontList::PlatformFontList());
 
     loader->FinalizeLoader(mFontInfo);
 
     return NS_OK;
 }
 
-NS_IMPL_ISUPPORTS_INHERITED0(FontInfoLoadCompleteEvent, nsRunnable);
+NS_IMPL_ISUPPORTS_INHERITED0(FontInfoLoadCompleteEvent, Runnable);
 
 // runs on separate thread
 nsresult
 AsyncFontInfoLoader::Run()
 {
     // load platform-specific font info
     mFontInfo->Load();
 
     // post a completion event that transfer the data to the fontlist
     NS_DispatchToMainThread(mCompleteEvent);
 
     return NS_OK;
 }
 
-NS_IMPL_ISUPPORTS_INHERITED0(AsyncFontInfoLoader, nsRunnable);
+NS_IMPL_ISUPPORTS_INHERITED0(AsyncFontInfoLoader, Runnable);
 
 NS_IMPL_ISUPPORTS(gfxFontInfoLoader::ShutdownObserver, nsIObserver)
 
 NS_IMETHODIMP
 gfxFontInfoLoader::ShutdownObserver::Observe(nsISupports *aSubject,
                                              const char *aTopic,
                                              const char16_t *someData)
 {
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -292,17 +292,17 @@ void CrashStatsLogForwarder::UpdateCrash
   nsresult annotated = NS_ERROR_NOT_IMPLEMENTED;
 #endif
   if (annotated != NS_OK) {
     printf("Crash Annotation %s: %s",
            mCrashCriticalKey.get(), message.str().c_str());
   }
 }
 
-class LogForwarderEvent : public nsRunnable
+class LogForwarderEvent : public Runnable
 {
   virtual ~LogForwarderEvent() {}
 
   NS_DECL_ISUPPORTS_INHERITED
 
   explicit LogForwarderEvent(const nsCString& aMessage) : mMessage(aMessage) {}
 
   NS_IMETHOD Run() override {
@@ -311,17 +311,17 @@ class LogForwarderEvent : public nsRunna
     cc->SendGraphicsError(mMessage);
     return NS_OK;
   }
 
 protected:
   nsCString mMessage;
 };
 
-NS_IMPL_ISUPPORTS_INHERITED0(LogForwarderEvent, nsRunnable);
+NS_IMPL_ISUPPORTS_INHERITED0(LogForwarderEvent, Runnable);
 
 void CrashStatsLogForwarder::Log(const std::string& aString)
 {
   MutexAutoLock lock(mMutex);
 
   if (UpdateStringsVector(aString)) {
     UpdateCrashReport();
   }
@@ -334,17 +334,17 @@ void CrashStatsLogForwarder::Log(const s
       cc->SendGraphicsError(stringToSend);
     } else {
       nsCOMPtr<nsIRunnable> r1 = new LogForwarderEvent(stringToSend);
       NS_DispatchToMainThread(r1);
     }
   }
 }
 
-class CrashTelemetryEvent : public nsRunnable
+class CrashTelemetryEvent : public Runnable
 {
   virtual ~CrashTelemetryEvent() {}
 
   NS_DECL_ISUPPORTS_INHERITED
 
   explicit CrashTelemetryEvent(uint32_t aReason) : mReason(aReason) {}
 
   NS_IMETHOD Run() override {
@@ -352,17 +352,17 @@ class CrashTelemetryEvent : public nsRun
     Telemetry::Accumulate(Telemetry::GFX_CRASH, mReason);
     return NS_OK;
   }
 
 protected:
   uint32_t mReason;
 };
 
-NS_IMPL_ISUPPORTS_INHERITED0(CrashTelemetryEvent, nsRunnable);
+NS_IMPL_ISUPPORTS_INHERITED0(CrashTelemetryEvent, Runnable);
 
 void
 CrashStatsLogForwarder::CrashAction(LogReason aReason)
 {
 #ifndef RELEASE_BUILD
   // Non-release builds crash by default, but will use telemetry
   // if this environment variable is present.
   static bool useTelemetry = gfxEnv::GfxDevCrashTelemetry();
--- a/image/DecodePool.cpp
+++ b/image/DecodePool.cpp
@@ -31,17 +31,17 @@ using std::min;
 
 namespace mozilla {
 namespace image {
 
 ///////////////////////////////////////////////////////////////////////////////
 // Helper runnables.
 ///////////////////////////////////////////////////////////////////////////////
 
-class NotifyProgressWorker : public nsRunnable
+class NotifyProgressWorker : public Runnable
 {
 public:
   /**
    * Called by the DecodePool when it's done some significant portion of
    * decoding, so that progress can be recorded and notifications can be sent.
    */
   static void Dispatch(RasterImage* aImage,
                        Progress aProgress,
@@ -74,17 +74,17 @@ private:
   { }
 
   RefPtr<RasterImage> mImage;
   const Progress mProgress;
   const nsIntRect mInvalidRect;
   const SurfaceFlags mSurfaceFlags;
 };
 
-class NotifyDecodeCompleteWorker : public nsRunnable
+class NotifyDecodeCompleteWorker : public Runnable
 {
 public:
   /**
    * Called by the DecodePool when decoding is complete, so that final cleanup
    * can be performed.
    */
   static void Dispatch(Decoder* aDecoder)
   {
@@ -106,17 +106,17 @@ private:
     : mDecoder(aDecoder)
   { }
 
   RefPtr<Decoder> mDecoder;
 };
 
 #ifdef MOZ_NUWA_PROCESS
 
-class RegisterDecodeIOThreadWithNuwaRunnable : public nsRunnable
+class RegisterDecodeIOThreadWithNuwaRunnable : public Runnable
 {
 public:
   NS_IMETHOD Run()
   {
     NuwaMarkCurrentThread(static_cast<void(*)(void*)>(nullptr), nullptr);
     return NS_OK;
   }
 };
@@ -255,17 +255,17 @@ private:
 
   // mMonitor guards the queues and mShuttingDown.
   Monitor mMonitor;
   nsTArray<RefPtr<Decoder>> mMetadataDecodeQueue;
   nsTArray<RefPtr<Decoder>> mFullDecodeQueue;
   bool mShuttingDown;
 };
 
-class DecodePoolWorker : public nsRunnable
+class DecodePoolWorker : public Runnable
 {
 public:
   explicit DecodePoolWorker(DecodePoolImpl* aImpl) : mImpl(aImpl) { }
 
   NS_IMETHOD Run()
   {
     MOZ_ASSERT(!NS_IsMainThread());
 
--- a/image/ProgressTracker.cpp
+++ b/image/ProgressTracker.cpp
@@ -108,17 +108,17 @@ ProgressTracker::GetImageStatus() const
   if (mProgress & FLAG_HAS_ERROR) {
     status |= imgIRequest::STATUS_ERROR;
   }
 
   return status;
 }
 
 // A helper class to allow us to call SyncNotify asynchronously.
-class AsyncNotifyRunnable : public nsRunnable
+class AsyncNotifyRunnable : public Runnable
 {
   public:
     AsyncNotifyRunnable(ProgressTracker* aTracker,
                         IProgressObserver* aObserver)
       : mTracker(aTracker)
     {
       MOZ_ASSERT(NS_IsMainThread(), "Should be created on the main thread");
       MOZ_ASSERT(aTracker, "aTracker should not be null");
@@ -188,17 +188,17 @@ ProgressTracker::Notify(IProgressObserve
   } else {
     mRunnable = new AsyncNotifyRunnable(this, aObserver);
     NS_DispatchToCurrentThread(mRunnable);
   }
 }
 
 // A helper class to allow us to call SyncNotify asynchronously for a given,
 // fixed, state.
-class AsyncNotifyCurrentStateRunnable : public nsRunnable
+class AsyncNotifyCurrentStateRunnable : public Runnable
 {
   public:
     AsyncNotifyCurrentStateRunnable(ProgressTracker* aProgressTracker,
                                     IProgressObserver* aObserver)
       : mProgressTracker(aProgressTracker)
       , mObserver(aObserver)
     {
       MOZ_ASSERT(NS_IsMainThread(), "Should be created on the main thread");
--- a/image/RasterImage.cpp
+++ b/image/RasterImage.cpp
@@ -755,17 +755,17 @@ RasterImage::CollectSizeOfSurfaces(nsTAr
                                    MallocSizeOf aMallocSizeOf) const
 {
   SurfaceCache::CollectSizeOfSurfaces(ImageKey(this), aCounters, aMallocSizeOf);
   if (mAnim) {
     mAnim->CollectSizeOfCompositingSurfaces(aCounters, aMallocSizeOf);
   }
 }
 
-class OnAddedFrameRunnable : public nsRunnable
+class OnAddedFrameRunnable : public Runnable
 {
 public:
   OnAddedFrameRunnable(RasterImage* aImage,
                        uint32_t aNewFrameCount,
                        const IntRect& aNewRefreshArea)
     : mImage(aImage)
     , mNewFrameCount(aNewFrameCount)
     , mNewRefreshArea(aNewRefreshArea)
--- a/image/RasterImage.h
+++ b/image/RasterImage.h
@@ -416,17 +416,17 @@ private: // data
   // Determines whether we can downscale during decode with the given
   // parameters.
   bool CanDownscaleDuringDecode(const nsIntSize& aSize, uint32_t aFlags);
 
 
   // Error handling.
   void DoError();
 
-  class HandleErrorWorker : public nsRunnable
+  class HandleErrorWorker : public Runnable
   {
   public:
     /**
      * Called from decoder threads when DoError() is called, since errors can't
      * be handled safely off-main-thread. Dispatches an event which reinvokes
      * DoError on the main thread if there isn't one already pending.
      */
     static void DispatchIfNeeded(RasterImage* aImage);
--- a/image/imgFrame.cpp
+++ b/image/imgFrame.cpp
@@ -811,17 +811,17 @@ void
 imgFrame::AssertImageDataLocked() const
 {
 #ifdef DEBUG
   MonitorAutoLock lock(mMonitor);
   MOZ_ASSERT(mLockCount > 0, "Image data should be locked");
 #endif
 }
 
-class UnlockImageDataRunnable : public nsRunnable
+class UnlockImageDataRunnable : public Runnable
 {
 public:
   explicit UnlockImageDataRunnable(imgFrame* aTarget)
     : mTarget(aTarget)
   {
     MOZ_ASSERT(mTarget);
   }
 
--- a/image/imgRequest.cpp
+++ b/image/imgRequest.cpp
@@ -303,17 +303,17 @@ imgRequest::CancelAndAbort(nsresult aSta
   // notification callbacks. In that case, make sure to break the cycle between
   // the channel and us, because it won't.
   if (mChannel) {
     mChannel->SetNotificationCallbacks(mPrevChannelSink);
     mPrevChannelSink = nullptr;
   }
 }
 
-class imgRequestMainThreadCancel : public nsRunnable
+class imgRequestMainThreadCancel : public Runnable
 {
 public:
   imgRequestMainThreadCancel(imgRequest* aImgRequest, nsresult aStatus)
     : mImgRequest(aImgRequest)
     , mStatus(aStatus)
   {
     MOZ_ASSERT(!NS_IsMainThread(), "Create me off main thread only!");
     MOZ_ASSERT(aImgRequest);
@@ -353,17 +353,17 @@ imgRequest::ContinueCancel(nsresult aSta
 
   RemoveFromCache();
 
   if (mRequest && !(progressTracker->GetProgress() & FLAG_LAST_PART_COMPLETE)) {
      mRequest->Cancel(aStatus);
   }
 }
 
-class imgRequestMainThreadEvict : public nsRunnable
+class imgRequestMainThreadEvict : public Runnable
 {
 public:
   explicit imgRequestMainThreadEvict(imgRequest* aImgRequest)
     : mImgRequest(aImgRequest)
   {
     MOZ_ASSERT(!NS_IsMainThread(), "Create me off main thread only!");
     MOZ_ASSERT(aImgRequest);
   }
@@ -987,17 +987,17 @@ PrepareForNewPart(nsIRequest* aRequest, 
     // indicates a bad content type) without cancelling the load, because
     // subsequent parts might be fine.
     result.mSucceeded = true;
   }
 
   return result;
 }
 
-class FinishPreparingForNewPartRunnable final : public nsRunnable
+class FinishPreparingForNewPartRunnable final : public Runnable
 {
 public:
   FinishPreparingForNewPartRunnable(imgRequest* aImgRequest,
                                     NewPartResult&& aResult)
     : mImgRequest(aImgRequest)
     , mResult(aResult)
   {
     MOZ_ASSERT(aImgRequest);
--- a/image/imgRequestProxy.h
+++ b/image/imgRequestProxy.h
@@ -133,17 +133,17 @@ public:
 
 protected:
   friend class mozilla::image::ProgressTracker;
   friend class imgStatusNotifyRunnable;
 
   class imgCancelRunnable;
   friend class imgCancelRunnable;
 
-  class imgCancelRunnable : public nsRunnable
+  class imgCancelRunnable : public mozilla::Runnable
   {
     public:
       imgCancelRunnable(imgRequestProxy* owner, nsresult status)
         : mOwner(owner), mStatus(status)
       { }
 
       NS_IMETHOD Run() override {
         mOwner->DoCancel(mStatus);
--- a/image/test/gtest/TestDecodeToSurface.cpp
+++ b/image/test/gtest/TestDecodeToSurface.cpp
@@ -27,17 +27,17 @@ TEST(ImageDecodeToSurface, ImageModuleAv
   // We can run into problems if XPCOM modules get initialized in the wrong
   // order. It's important that this test run first, both as a sanity check and
   // to ensure we get the module initialization order we want.
   nsCOMPtr<imgITools> imgTools =
     do_CreateInstance("@mozilla.org/image/tools;1");
   EXPECT_TRUE(imgTools != nullptr);
 }
 
-class DecodeToSurfaceRunnable : public nsRunnable
+class DecodeToSurfaceRunnable : public Runnable
 {
 public:
   DecodeToSurfaceRunnable(RefPtr<SourceSurface>& aSurface,
                           nsIInputStream* aInputStream,
                           const ImageTestCase& aTestCase)
     : mSurface(aSurface)
     , mInputStream(aInputStream)
     , mTestCase(aTestCase)
--- a/ipc/glue/BackgroundImpl.cpp
+++ b/ipc/glue/BackgroundImpl.cpp
@@ -490,103 +490,94 @@ public:
 
 private:
   ~ShutdownObserver()
   {
     AssertIsOnMainThread();
   }
 };
 
-class ParentImpl::RequestMessageLoopRunnable final :
-  public nsRunnable
+class ParentImpl::RequestMessageLoopRunnable final : public Runnable
 {
   nsCOMPtr<nsIThread> mTargetThread;
   MessageLoop* mMessageLoop;
 
 public:
   explicit RequestMessageLoopRunnable(nsIThread* aTargetThread)