From d200ed89d014eb011ece6985fa0012c9f8f5a789 Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Mon, 11 Apr 2016 11:40:06 -0700 Subject: [PATCH] Bug 1263311: Part 3 - s/nsCancelableRunnable/CancelableRunnable/g. r=froydnj --- dom/base/ImageEncoder.cpp | 2 +- dom/base/WebSocket.cpp | 2 +- dom/base/nsPerformance.cpp | 2 +- dom/cache/CachePushStreamChild.cpp | 4 ++-- dom/cache/ReadStream.cpp | 4 ++-- dom/canvas/WebGLContext.cpp | 2 +- dom/canvas/WebGLContextLossHandler.cpp | 2 +- dom/crypto/WebCryptoTask.h | 2 +- dom/events/AsyncEventDispatcher.h | 2 +- dom/html/HTMLCanvasElement.cpp | 4 ++-- dom/indexedDB/ActorsChild.cpp | 4 ++-- dom/indexedDB/IDBDatabase.cpp | 2 +- dom/ipc/Blob.cpp | 4 ++-- dom/messagechannel/MessagePort.cpp | 2 +- dom/promise/PromiseDebugging.cpp | 2 +- gfx/src/gfxCrashReporterUtils.cpp | 2 +- ipc/glue/BackgroundImpl.cpp | 2 +- ipc/glue/MessagePump.cpp | 4 ++-- netwerk/protocol/websocket/WebSocketChannel.cpp | 2 +- xpcom/base/DebuggerOnGCRunnable.h | 2 +- xpcom/base/nsCycleCollector.cpp | 2 +- xpcom/glue/nsThreadUtils.cpp | 4 ++-- xpcom/glue/nsThreadUtils.h | 6 +++--- xpcom/io/nsStreamUtils.cpp | 12 ++++++------ xpcom/threads/TimerThread.cpp | 2 +- 25 files changed, 39 insertions(+), 39 deletions(-) diff --git a/dom/base/ImageEncoder.cpp b/dom/base/ImageEncoder.cpp index dc3456e79dee..4fb13cd035a9 100644 --- a/dom/base/ImageEncoder.cpp +++ b/dom/base/ImageEncoder.cpp @@ -72,7 +72,7 @@ GetBRGADataSourceSurfaceSync(already_AddRefed aImage) return helper->GetDataSurfaceSafe(); } -class EncodingCompleteEvent : public nsCancelableRunnable +class EncodingCompleteEvent : public CancelableRunnable { virtual ~EncodingCompleteEvent() {} diff --git a/dom/base/WebSocket.cpp b/dom/base/WebSocket.cpp index a9d82e02b825..bfd9ca141705 100644 --- a/dom/base/WebSocket.cpp +++ b/dom/base/WebSocket.cpp @@ -253,7 +253,7 @@ NS_IMPL_ISUPPORTS(WebSocketImpl, nsIRequest, nsIEventTarget) -class CallDispatchConnectionCloseEvents final : public nsCancelableRunnable +class CallDispatchConnectionCloseEvents final : public CancelableRunnable { public: explicit CallDispatchConnectionCloseEvents(WebSocketImpl* aWebSocketImpl) diff --git a/dom/base/nsPerformance.cpp b/dom/base/nsPerformance.cpp index cf642b2ab00d..459ea6330b23 100644 --- a/dom/base/nsPerformance.cpp +++ b/dom/base/nsPerformance.cpp @@ -1136,7 +1136,7 @@ PerformanceBase::CancelNotificationObservers() mPendingNotificationObserversTask = false; } -class NotifyObserversTask final : public nsCancelableRunnable +class NotifyObserversTask final : public CancelableRunnable { public: explicit NotifyObserversTask(PerformanceBase* aPerformance) diff --git a/dom/cache/CachePushStreamChild.cpp b/dom/cache/CachePushStreamChild.cpp index 0a4c7048e1a7..32fa438bc7b3 100644 --- a/dom/cache/CachePushStreamChild.cpp +++ b/dom/cache/CachePushStreamChild.cpp @@ -17,7 +17,7 @@ namespace dom { namespace cache { class CachePushStreamChild::Callback final : public nsIInputStreamCallback - , public nsCancelableRunnable + , public CancelableRunnable { public: explicit Callback(CachePushStreamChild* aActor) @@ -89,7 +89,7 @@ private: }; NS_IMPL_ISUPPORTS_INHERITED(CachePushStreamChild::Callback, - nsCancelableRunnable, + CancelableRunnable, nsIInputStreamCallback); CachePushStreamChild::CachePushStreamChild(Feature* aFeature, diff --git a/dom/cache/ReadStream.cpp b/dom/cache/ReadStream.cpp index e1fe3681dbb5..aa4179dd74a6 100644 --- a/dom/cache/ReadStream.cpp +++ b/dom/cache/ReadStream.cpp @@ -117,7 +117,7 @@ private: // be done on the thread associated with the PBackground actor. Must be // cancelable to execute on Worker threads (which can occur when the // ReadStream is constructed on a child process Worker thread). -class ReadStream::Inner::NoteClosedRunnable final : public nsCancelableRunnable +class ReadStream::Inner::NoteClosedRunnable final : public CancelableRunnable { public: explicit NoteClosedRunnable(ReadStream::Inner* aStream) @@ -152,7 +152,7 @@ private: // it on the thread associated with the PBackground actor. Must be // cancelable to execute on Worker threads (which can occur when the // ReadStream is constructed on a child process Worker thread). -class ReadStream::Inner::ForgetRunnable final : public nsCancelableRunnable +class ReadStream::Inner::ForgetRunnable final : public CancelableRunnable { public: explicit ForgetRunnable(ReadStream::Inner* aStream) diff --git a/dom/canvas/WebGLContext.cpp b/dom/canvas/WebGLContext.cpp index d9ec492e7adc..d4781d615997 100644 --- a/dom/canvas/WebGLContext.cpp +++ b/dom/canvas/WebGLContext.cpp @@ -1538,7 +1538,7 @@ WebGLContext::RunContextLossTimer() mContextLossHandler->RunTimer(); } -class UpdateContextLossStatusTask : public nsCancelableRunnable +class UpdateContextLossStatusTask : public CancelableRunnable { RefPtr mWebGL; diff --git a/dom/canvas/WebGLContextLossHandler.cpp b/dom/canvas/WebGLContextLossHandler.cpp index 05f58b24d604..6c7530d5be2f 100644 --- a/dom/canvas/WebGLContextLossHandler.cpp +++ b/dom/canvas/WebGLContextLossHandler.cpp @@ -38,7 +38,7 @@ private: nsCOMPtr mEventTarget; }; -class ContextLossWorkerRunnable final : public nsCancelableRunnable +class ContextLossWorkerRunnable final : public CancelableRunnable { public: explicit ContextLossWorkerRunnable(nsIRunnable* aRunnable) diff --git a/dom/crypto/WebCryptoTask.h b/dom/crypto/WebCryptoTask.h index 86d03acfb58e..0c99eacf4935 100644 --- a/dom/crypto/WebCryptoTask.h +++ b/dom/crypto/WebCryptoTask.h @@ -57,7 +57,7 @@ if (NS_FAILED(rv)) { \ return; \ } -class WebCryptoTask : public nsCancelableRunnable, +class WebCryptoTask : public CancelableRunnable, public nsNSSShutDownObject { public: diff --git a/dom/events/AsyncEventDispatcher.h b/dom/events/AsyncEventDispatcher.h index 0577f76d3d26..094e764b6cef 100644 --- a/dom/events/AsyncEventDispatcher.h +++ b/dom/events/AsyncEventDispatcher.h @@ -25,7 +25,7 @@ namespace mozilla { * the wrong time, in order to avoid resulting instability. */ -class AsyncEventDispatcher : public nsCancelableRunnable +class AsyncEventDispatcher : public CancelableRunnable { public: /** diff --git a/dom/html/HTMLCanvasElement.cpp b/dom/html/HTMLCanvasElement.cpp index 8c5cb0f6ba2b..835a114f6e89 100644 --- a/dom/html/HTMLCanvasElement.cpp +++ b/dom/html/HTMLCanvasElement.cpp @@ -1263,7 +1263,7 @@ HTMLCanvasElement::OnVisibilityChange() } if (mOffscreenCanvas) { - class Runnable final : public nsCancelableRunnable + class Runnable final : public CancelableRunnable { public: explicit Runnable(AsyncCanvasRenderer* aRenderer) @@ -1305,7 +1305,7 @@ void HTMLCanvasElement::OnMemoryPressure() { if (mOffscreenCanvas) { - class Runnable final : public nsCancelableRunnable + class Runnable final : public CancelableRunnable { public: explicit Runnable(AsyncCanvasRenderer* aRenderer) diff --git a/dom/indexedDB/ActorsChild.cpp b/dom/indexedDB/ActorsChild.cpp index c1a8eceb5994..b088ec114dd9 100644 --- a/dom/indexedDB/ActorsChild.cpp +++ b/dom/indexedDB/ActorsChild.cpp @@ -2531,9 +2531,9 @@ BackgroundRequestChild::Recv__delete__(const RequestResponse& aResponse) ******************************************************************************/ // Does not need to be threadsafe since this only runs on one thread, but -// inheriting from nsCancelableRunnable is easy. +// inheriting from CancelableRunnable is easy. class BackgroundCursorChild::DelayedActionRunnable final - : public nsCancelableRunnable + : public CancelableRunnable { using ActionFunc = void (BackgroundCursorChild::*)(); diff --git a/dom/indexedDB/IDBDatabase.cpp b/dom/indexedDB/IDBDatabase.cpp index 1dbddf3001fd..77cf208127a4 100644 --- a/dom/indexedDB/IDBDatabase.cpp +++ b/dom/indexedDB/IDBDatabase.cpp @@ -67,7 +67,7 @@ const char kMemoryPressureObserverTopic[] = "memory-pressure"; const char kWindowObserverTopic[] = "inner-window-destroyed"; class CancelableRunnableWrapper final - : public nsCancelableRunnable + : public CancelableRunnable { nsCOMPtr mRunnable; diff --git a/dom/ipc/Blob.cpp b/dom/ipc/Blob.cpp index 5aa557ff976a..71e01c77330f 100644 --- a/dom/ipc/Blob.cpp +++ b/dom/ipc/Blob.cpp @@ -212,7 +212,7 @@ EventTargetIsOnCurrentThread(nsIEventTarget* aEventTarget) } class CancelableRunnableWrapper final - : public nsCancelableRunnable + : public CancelableRunnable { nsCOMPtr mRunnable; #ifdef DEBUG @@ -241,7 +241,7 @@ private: nsresult Cancel() override; }; -NS_IMPL_ISUPPORTS_INHERITED0(CancelableRunnableWrapper, nsCancelableRunnable) +NS_IMPL_ISUPPORTS_INHERITED0(CancelableRunnableWrapper, CancelableRunnable) NS_IMETHODIMP CancelableRunnableWrapper::Run() diff --git a/dom/messagechannel/MessagePort.cpp b/dom/messagechannel/MessagePort.cpp index 25684921c08b..7c4e59707f28 100644 --- a/dom/messagechannel/MessagePort.cpp +++ b/dom/messagechannel/MessagePort.cpp @@ -48,7 +48,7 @@ using namespace mozilla::dom::workers; namespace mozilla { namespace dom { -class PostMessageRunnable final : public nsCancelableRunnable +class PostMessageRunnable final : public CancelableRunnable { friend class MessagePort; diff --git a/dom/promise/PromiseDebugging.cpp b/dom/promise/PromiseDebugging.cpp index 92d181f649cf..f12bf0f3be88 100644 --- a/dom/promise/PromiseDebugging.cpp +++ b/dom/promise/PromiseDebugging.cpp @@ -21,7 +21,7 @@ namespace mozilla { namespace dom { -class FlushRejections: public nsCancelableRunnable +class FlushRejections: public CancelableRunnable { public: static void Init() { diff --git a/gfx/src/gfxCrashReporterUtils.cpp b/gfx/src/gfxCrashReporterUtils.cpp index da002c35bb4c..650488f82f1e 100644 --- a/gfx/src/gfxCrashReporterUtils.cpp +++ b/gfx/src/gfxCrashReporterUtils.cpp @@ -83,7 +83,7 @@ public: } }; -class AppendAppNotesRunnable : public nsCancelableRunnable { +class AppendAppNotesRunnable : public CancelableRunnable { public: explicit AppendAppNotesRunnable(const nsACString& aFeatureStr) : mFeatureString(aFeatureStr) diff --git a/ipc/glue/BackgroundImpl.cpp b/ipc/glue/BackgroundImpl.cpp index 6529f5383dac..9fd213e65e10 100644 --- a/ipc/glue/BackgroundImpl.cpp +++ b/ipc/glue/BackgroundImpl.cpp @@ -700,7 +700,7 @@ private: // Must be cancelable in order to dispatch on active worker threads class ChildImpl::AlreadyCreatedCallbackRunnable final : - public nsCancelableRunnable + public CancelableRunnable { public: AlreadyCreatedCallbackRunnable() diff --git a/ipc/glue/MessagePump.cpp b/ipc/glue/MessagePump.cpp index c98fba9a6661..4535ee2f9569 100644 --- a/ipc/glue/MessagePump.cpp +++ b/ipc/glue/MessagePump.cpp @@ -39,7 +39,7 @@ static MessagePump::Delegate* gFirstDelegate; namespace mozilla { namespace ipc { -class DoWorkRunnable final : public nsCancelableRunnable, +class DoWorkRunnable final : public CancelableRunnable, public nsITimerCallback { public: @@ -209,7 +209,7 @@ MessagePump::DoDelayedWork(base::MessagePump::Delegate* aDelegate) } } -NS_IMPL_ISUPPORTS_INHERITED(DoWorkRunnable, nsCancelableRunnable, +NS_IMPL_ISUPPORTS_INHERITED(DoWorkRunnable, CancelableRunnable, nsITimerCallback) NS_IMETHODIMP diff --git a/netwerk/protocol/websocket/WebSocketChannel.cpp b/netwerk/protocol/websocket/WebSocketChannel.cpp index d0b5f1418486..466a241ca5ea 100644 --- a/netwerk/protocol/websocket/WebSocketChannel.cpp +++ b/netwerk/protocol/websocket/WebSocketChannel.cpp @@ -691,7 +691,7 @@ NS_IMPL_ISUPPORTS(CallOnServerClose, nsIRunnable) // CallAcknowledge //----------------------------------------------------------------------------- -class CallAcknowledge final : public nsCancelableRunnable +class CallAcknowledge final : public CancelableRunnable { public: CallAcknowledge(WebSocketChannel* aChannel, diff --git a/xpcom/base/DebuggerOnGCRunnable.h b/xpcom/base/DebuggerOnGCRunnable.h index f89aea30018b..c1b3793110df 100644 --- a/xpcom/base/DebuggerOnGCRunnable.h +++ b/xpcom/base/DebuggerOnGCRunnable.h @@ -15,7 +15,7 @@ namespace mozilla { // Runnable to fire the SpiderMonkey Debugger API's onGarbageCollection hook. -class DebuggerOnGCRunnable : public nsCancelableRunnable +class DebuggerOnGCRunnable : public CancelableRunnable { JS::dbg::GarbageCollectionEvent::Ptr mGCData; diff --git a/xpcom/base/nsCycleCollector.cpp b/xpcom/base/nsCycleCollector.cpp index ca95ea5970f4..e7671f1dbece 100644 --- a/xpcom/base/nsCycleCollector.cpp +++ b/xpcom/base/nsCycleCollector.cpp @@ -1492,7 +1492,7 @@ struct CCGraphDescriber : public LinkedListElement Type mType; }; -class LogStringMessageAsync : public nsCancelableRunnable +class LogStringMessageAsync : public CancelableRunnable { public: explicit LogStringMessageAsync(const nsAString& aMsg) : mMsg(aMsg) diff --git a/xpcom/glue/nsThreadUtils.cpp b/xpcom/glue/nsThreadUtils.cpp index 83c6582d5a0a..3a0bb986c19a 100644 --- a/xpcom/glue/nsThreadUtils.cpp +++ b/xpcom/glue/nsThreadUtils.cpp @@ -41,11 +41,11 @@ nsRunnable::Run() return NS_OK; } -NS_IMPL_ISUPPORTS_INHERITED(nsCancelableRunnable, nsRunnable, +NS_IMPL_ISUPPORTS_INHERITED(CancelableRunnable, nsRunnable, nsICancelableRunnable) nsresult -nsCancelableRunnable::Cancel() +CancelableRunnable::Cancel() { // Do nothing return NS_OK; diff --git a/xpcom/glue/nsThreadUtils.h b/xpcom/glue/nsThreadUtils.h index e62d25198b73..3b98aded32fc 100644 --- a/xpcom/glue/nsThreadUtils.h +++ b/xpcom/glue/nsThreadUtils.h @@ -233,7 +233,7 @@ protected: }; // This class is designed to be subclassed. -class nsCancelableRunnable : public nsRunnable, +class CancelableRunnable : public nsRunnable, public nsICancelableRunnable { public: @@ -241,10 +241,10 @@ public: // nsICancelableRunnable virtual nsresult Cancel() override; - nsCancelableRunnable() {} + CancelableRunnable() {} protected: - virtual ~nsCancelableRunnable() {} + virtual ~CancelableRunnable() {} }; // An event that can be used to call a C++11 functions or function objects, diff --git a/xpcom/io/nsStreamUtils.cpp b/xpcom/io/nsStreamUtils.cpp index c7e46768442e..b2f28c7b0e14 100644 --- a/xpcom/io/nsStreamUtils.cpp +++ b/xpcom/io/nsStreamUtils.cpp @@ -30,7 +30,7 @@ using namespace mozilla; // those can be shut down at any time, and in these cases, Cancel() is called // instead of Run(). class nsInputStreamReadyEvent final - : public nsCancelableRunnable + : public CancelableRunnable , public nsIInputStreamCallback { public: @@ -111,7 +111,7 @@ private: nsCOMPtr mTarget; }; -NS_IMPL_ISUPPORTS_INHERITED(nsInputStreamReadyEvent, nsCancelableRunnable, +NS_IMPL_ISUPPORTS_INHERITED(nsInputStreamReadyEvent, CancelableRunnable, nsIInputStreamCallback) //----------------------------------------------------------------------------- @@ -120,7 +120,7 @@ NS_IMPL_ISUPPORTS_INHERITED(nsInputStreamReadyEvent, nsCancelableRunnable, // those can be shut down at any time, and in these cases, Cancel() is called // instead of Run(). class nsOutputStreamReadyEvent final - : public nsCancelableRunnable + : public CancelableRunnable , public nsIOutputStreamCallback { public: @@ -201,7 +201,7 @@ private: nsCOMPtr mTarget; }; -NS_IMPL_ISUPPORTS_INHERITED(nsOutputStreamReadyEvent, nsCancelableRunnable, +NS_IMPL_ISUPPORTS_INHERITED(nsOutputStreamReadyEvent, CancelableRunnable, nsIOutputStreamCallback) //----------------------------------------------------------------------------- @@ -235,7 +235,7 @@ NS_NewOutputStreamReadyEvent(nsIOutputStreamCallback* aCallback, class nsAStreamCopier : public nsIInputStreamCallback , public nsIOutputStreamCallback - , public nsCancelableRunnable + , public CancelableRunnable { public: NS_DECL_ISUPPORTS_INHERITED @@ -508,7 +508,7 @@ protected: }; NS_IMPL_ISUPPORTS_INHERITED(nsAStreamCopier, - nsCancelableRunnable, + CancelableRunnable, nsIInputStreamCallback, nsIOutputStreamCallback) diff --git a/xpcom/threads/TimerThread.cpp b/xpcom/threads/TimerThread.cpp index 7cee38502c62..3189967c8912 100644 --- a/xpcom/threads/TimerThread.cpp +++ b/xpcom/threads/TimerThread.cpp @@ -134,7 +134,7 @@ public: // This is a nsICancelableRunnable because we can dispatch it to Workers and // those can be shut down at any time, and in these cases, Cancel() is called // instead of Run(). -class nsTimerEvent : public nsCancelableRunnable +class nsTimerEvent : public CancelableRunnable { public: NS_IMETHOD Run() override;