mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1263311: Part 3 - s/nsCancelableRunnable/CancelableRunnable/g. r=froydnj
This commit is contained in:
parent
fcad56a170
commit
d200ed89d0
@ -72,7 +72,7 @@ GetBRGADataSourceSurfaceSync(already_AddRefed<layers::Image> aImage)
|
|||||||
return helper->GetDataSurfaceSafe();
|
return helper->GetDataSurfaceSafe();
|
||||||
}
|
}
|
||||||
|
|
||||||
class EncodingCompleteEvent : public nsCancelableRunnable
|
class EncodingCompleteEvent : public CancelableRunnable
|
||||||
{
|
{
|
||||||
virtual ~EncodingCompleteEvent() {}
|
virtual ~EncodingCompleteEvent() {}
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ NS_IMPL_ISUPPORTS(WebSocketImpl,
|
|||||||
nsIRequest,
|
nsIRequest,
|
||||||
nsIEventTarget)
|
nsIEventTarget)
|
||||||
|
|
||||||
class CallDispatchConnectionCloseEvents final : public nsCancelableRunnable
|
class CallDispatchConnectionCloseEvents final : public CancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit CallDispatchConnectionCloseEvents(WebSocketImpl* aWebSocketImpl)
|
explicit CallDispatchConnectionCloseEvents(WebSocketImpl* aWebSocketImpl)
|
||||||
|
@ -1136,7 +1136,7 @@ PerformanceBase::CancelNotificationObservers()
|
|||||||
mPendingNotificationObserversTask = false;
|
mPendingNotificationObserversTask = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
class NotifyObserversTask final : public nsCancelableRunnable
|
class NotifyObserversTask final : public CancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit NotifyObserversTask(PerformanceBase* aPerformance)
|
explicit NotifyObserversTask(PerformanceBase* aPerformance)
|
||||||
|
4
dom/cache/CachePushStreamChild.cpp
vendored
4
dom/cache/CachePushStreamChild.cpp
vendored
@ -17,7 +17,7 @@ namespace dom {
|
|||||||
namespace cache {
|
namespace cache {
|
||||||
|
|
||||||
class CachePushStreamChild::Callback final : public nsIInputStreamCallback
|
class CachePushStreamChild::Callback final : public nsIInputStreamCallback
|
||||||
, public nsCancelableRunnable
|
, public CancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit Callback(CachePushStreamChild* aActor)
|
explicit Callback(CachePushStreamChild* aActor)
|
||||||
@ -89,7 +89,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS_INHERITED(CachePushStreamChild::Callback,
|
NS_IMPL_ISUPPORTS_INHERITED(CachePushStreamChild::Callback,
|
||||||
nsCancelableRunnable,
|
CancelableRunnable,
|
||||||
nsIInputStreamCallback);
|
nsIInputStreamCallback);
|
||||||
|
|
||||||
CachePushStreamChild::CachePushStreamChild(Feature* aFeature,
|
CachePushStreamChild::CachePushStreamChild(Feature* aFeature,
|
||||||
|
4
dom/cache/ReadStream.cpp
vendored
4
dom/cache/ReadStream.cpp
vendored
@ -117,7 +117,7 @@ private:
|
|||||||
// be done on the thread associated with the PBackground actor. Must be
|
// be done on the thread associated with the PBackground actor. Must be
|
||||||
// cancelable to execute on Worker threads (which can occur when the
|
// cancelable to execute on Worker threads (which can occur when the
|
||||||
// ReadStream is constructed on a child process Worker thread).
|
// ReadStream is constructed on a child process Worker thread).
|
||||||
class ReadStream::Inner::NoteClosedRunnable final : public nsCancelableRunnable
|
class ReadStream::Inner::NoteClosedRunnable final : public CancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit NoteClosedRunnable(ReadStream::Inner* aStream)
|
explicit NoteClosedRunnable(ReadStream::Inner* aStream)
|
||||||
@ -152,7 +152,7 @@ private:
|
|||||||
// it on the thread associated with the PBackground actor. Must be
|
// it on the thread associated with the PBackground actor. Must be
|
||||||
// cancelable to execute on Worker threads (which can occur when the
|
// cancelable to execute on Worker threads (which can occur when the
|
||||||
// ReadStream is constructed on a child process Worker thread).
|
// ReadStream is constructed on a child process Worker thread).
|
||||||
class ReadStream::Inner::ForgetRunnable final : public nsCancelableRunnable
|
class ReadStream::Inner::ForgetRunnable final : public CancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ForgetRunnable(ReadStream::Inner* aStream)
|
explicit ForgetRunnable(ReadStream::Inner* aStream)
|
||||||
|
@ -1538,7 +1538,7 @@ WebGLContext::RunContextLossTimer()
|
|||||||
mContextLossHandler->RunTimer();
|
mContextLossHandler->RunTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
class UpdateContextLossStatusTask : public nsCancelableRunnable
|
class UpdateContextLossStatusTask : public CancelableRunnable
|
||||||
{
|
{
|
||||||
RefPtr<WebGLContext> mWebGL;
|
RefPtr<WebGLContext> mWebGL;
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ private:
|
|||||||
nsCOMPtr<nsIEventTarget> mEventTarget;
|
nsCOMPtr<nsIEventTarget> mEventTarget;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ContextLossWorkerRunnable final : public nsCancelableRunnable
|
class ContextLossWorkerRunnable final : public CancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ContextLossWorkerRunnable(nsIRunnable* aRunnable)
|
explicit ContextLossWorkerRunnable(nsIRunnable* aRunnable)
|
||||||
|
@ -57,7 +57,7 @@ if (NS_FAILED(rv)) { \
|
|||||||
return; \
|
return; \
|
||||||
}
|
}
|
||||||
|
|
||||||
class WebCryptoTask : public nsCancelableRunnable,
|
class WebCryptoTask : public CancelableRunnable,
|
||||||
public nsNSSShutDownObject
|
public nsNSSShutDownObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -25,7 +25,7 @@ namespace mozilla {
|
|||||||
* the wrong time, in order to avoid resulting instability.
|
* the wrong time, in order to avoid resulting instability.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AsyncEventDispatcher : public nsCancelableRunnable
|
class AsyncEventDispatcher : public CancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
|
@ -1263,7 +1263,7 @@ HTMLCanvasElement::OnVisibilityChange()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mOffscreenCanvas) {
|
if (mOffscreenCanvas) {
|
||||||
class Runnable final : public nsCancelableRunnable
|
class Runnable final : public CancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit Runnable(AsyncCanvasRenderer* aRenderer)
|
explicit Runnable(AsyncCanvasRenderer* aRenderer)
|
||||||
@ -1305,7 +1305,7 @@ void
|
|||||||
HTMLCanvasElement::OnMemoryPressure()
|
HTMLCanvasElement::OnMemoryPressure()
|
||||||
{
|
{
|
||||||
if (mOffscreenCanvas) {
|
if (mOffscreenCanvas) {
|
||||||
class Runnable final : public nsCancelableRunnable
|
class Runnable final : public CancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit Runnable(AsyncCanvasRenderer* aRenderer)
|
explicit Runnable(AsyncCanvasRenderer* aRenderer)
|
||||||
|
@ -2531,9 +2531,9 @@ BackgroundRequestChild::Recv__delete__(const RequestResponse& aResponse)
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
// Does not need to be threadsafe since this only runs on one thread, but
|
// 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
|
class BackgroundCursorChild::DelayedActionRunnable final
|
||||||
: public nsCancelableRunnable
|
: public CancelableRunnable
|
||||||
{
|
{
|
||||||
using ActionFunc = void (BackgroundCursorChild::*)();
|
using ActionFunc = void (BackgroundCursorChild::*)();
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ const char kMemoryPressureObserverTopic[] = "memory-pressure";
|
|||||||
const char kWindowObserverTopic[] = "inner-window-destroyed";
|
const char kWindowObserverTopic[] = "inner-window-destroyed";
|
||||||
|
|
||||||
class CancelableRunnableWrapper final
|
class CancelableRunnableWrapper final
|
||||||
: public nsCancelableRunnable
|
: public CancelableRunnable
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIRunnable> mRunnable;
|
nsCOMPtr<nsIRunnable> mRunnable;
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ EventTargetIsOnCurrentThread(nsIEventTarget* aEventTarget)
|
|||||||
}
|
}
|
||||||
|
|
||||||
class CancelableRunnableWrapper final
|
class CancelableRunnableWrapper final
|
||||||
: public nsCancelableRunnable
|
: public CancelableRunnable
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIRunnable> mRunnable;
|
nsCOMPtr<nsIRunnable> mRunnable;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -241,7 +241,7 @@ private:
|
|||||||
nsresult Cancel() override;
|
nsresult Cancel() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS_INHERITED0(CancelableRunnableWrapper, nsCancelableRunnable)
|
NS_IMPL_ISUPPORTS_INHERITED0(CancelableRunnableWrapper, CancelableRunnable)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
CancelableRunnableWrapper::Run()
|
CancelableRunnableWrapper::Run()
|
||||||
|
@ -48,7 +48,7 @@ using namespace mozilla::dom::workers;
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class PostMessageRunnable final : public nsCancelableRunnable
|
class PostMessageRunnable final : public CancelableRunnable
|
||||||
{
|
{
|
||||||
friend class MessagePort;
|
friend class MessagePort;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class FlushRejections: public nsCancelableRunnable
|
class FlushRejections: public CancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void Init() {
|
static void Init() {
|
||||||
|
@ -83,7 +83,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class AppendAppNotesRunnable : public nsCancelableRunnable {
|
class AppendAppNotesRunnable : public CancelableRunnable {
|
||||||
public:
|
public:
|
||||||
explicit AppendAppNotesRunnable(const nsACString& aFeatureStr)
|
explicit AppendAppNotesRunnable(const nsACString& aFeatureStr)
|
||||||
: mFeatureString(aFeatureStr)
|
: mFeatureString(aFeatureStr)
|
||||||
|
@ -700,7 +700,7 @@ private:
|
|||||||
|
|
||||||
// Must be cancelable in order to dispatch on active worker threads
|
// Must be cancelable in order to dispatch on active worker threads
|
||||||
class ChildImpl::AlreadyCreatedCallbackRunnable final :
|
class ChildImpl::AlreadyCreatedCallbackRunnable final :
|
||||||
public nsCancelableRunnable
|
public CancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AlreadyCreatedCallbackRunnable()
|
AlreadyCreatedCallbackRunnable()
|
||||||
|
@ -39,7 +39,7 @@ static MessagePump::Delegate* gFirstDelegate;
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace ipc {
|
namespace ipc {
|
||||||
|
|
||||||
class DoWorkRunnable final : public nsCancelableRunnable,
|
class DoWorkRunnable final : public CancelableRunnable,
|
||||||
public nsITimerCallback
|
public nsITimerCallback
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -209,7 +209,7 @@ MessagePump::DoDelayedWork(base::MessagePump::Delegate* aDelegate)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS_INHERITED(DoWorkRunnable, nsCancelableRunnable,
|
NS_IMPL_ISUPPORTS_INHERITED(DoWorkRunnable, CancelableRunnable,
|
||||||
nsITimerCallback)
|
nsITimerCallback)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
@ -691,7 +691,7 @@ NS_IMPL_ISUPPORTS(CallOnServerClose, nsIRunnable)
|
|||||||
// CallAcknowledge
|
// CallAcknowledge
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
class CallAcknowledge final : public nsCancelableRunnable
|
class CallAcknowledge final : public CancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CallAcknowledge(WebSocketChannel* aChannel,
|
CallAcknowledge(WebSocketChannel* aChannel,
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
// Runnable to fire the SpiderMonkey Debugger API's onGarbageCollection hook.
|
// Runnable to fire the SpiderMonkey Debugger API's onGarbageCollection hook.
|
||||||
class DebuggerOnGCRunnable : public nsCancelableRunnable
|
class DebuggerOnGCRunnable : public CancelableRunnable
|
||||||
{
|
{
|
||||||
JS::dbg::GarbageCollectionEvent::Ptr mGCData;
|
JS::dbg::GarbageCollectionEvent::Ptr mGCData;
|
||||||
|
|
||||||
|
@ -1492,7 +1492,7 @@ struct CCGraphDescriber : public LinkedListElement<CCGraphDescriber>
|
|||||||
Type mType;
|
Type mType;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LogStringMessageAsync : public nsCancelableRunnable
|
class LogStringMessageAsync : public CancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit LogStringMessageAsync(const nsAString& aMsg) : mMsg(aMsg)
|
explicit LogStringMessageAsync(const nsAString& aMsg) : mMsg(aMsg)
|
||||||
|
@ -41,11 +41,11 @@ nsRunnable::Run()
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS_INHERITED(nsCancelableRunnable, nsRunnable,
|
NS_IMPL_ISUPPORTS_INHERITED(CancelableRunnable, nsRunnable,
|
||||||
nsICancelableRunnable)
|
nsICancelableRunnable)
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsCancelableRunnable::Cancel()
|
CancelableRunnable::Cancel()
|
||||||
{
|
{
|
||||||
// Do nothing
|
// Do nothing
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -233,7 +233,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// This class is designed to be subclassed.
|
// This class is designed to be subclassed.
|
||||||
class nsCancelableRunnable : public nsRunnable,
|
class CancelableRunnable : public nsRunnable,
|
||||||
public nsICancelableRunnable
|
public nsICancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -241,10 +241,10 @@ public:
|
|||||||
// nsICancelableRunnable
|
// nsICancelableRunnable
|
||||||
virtual nsresult Cancel() override;
|
virtual nsresult Cancel() override;
|
||||||
|
|
||||||
nsCancelableRunnable() {}
|
CancelableRunnable() {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~nsCancelableRunnable() {}
|
virtual ~CancelableRunnable() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// An event that can be used to call a C++11 functions or function objects,
|
// An event that can be used to call a C++11 functions or function objects,
|
||||||
|
@ -30,7 +30,7 @@ using namespace mozilla;
|
|||||||
// those can be shut down at any time, and in these cases, Cancel() is called
|
// those can be shut down at any time, and in these cases, Cancel() is called
|
||||||
// instead of Run().
|
// instead of Run().
|
||||||
class nsInputStreamReadyEvent final
|
class nsInputStreamReadyEvent final
|
||||||
: public nsCancelableRunnable
|
: public CancelableRunnable
|
||||||
, public nsIInputStreamCallback
|
, public nsIInputStreamCallback
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -111,7 +111,7 @@ private:
|
|||||||
nsCOMPtr<nsIEventTarget> mTarget;
|
nsCOMPtr<nsIEventTarget> mTarget;
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS_INHERITED(nsInputStreamReadyEvent, nsCancelableRunnable,
|
NS_IMPL_ISUPPORTS_INHERITED(nsInputStreamReadyEvent, CancelableRunnable,
|
||||||
nsIInputStreamCallback)
|
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
|
// those can be shut down at any time, and in these cases, Cancel() is called
|
||||||
// instead of Run().
|
// instead of Run().
|
||||||
class nsOutputStreamReadyEvent final
|
class nsOutputStreamReadyEvent final
|
||||||
: public nsCancelableRunnable
|
: public CancelableRunnable
|
||||||
, public nsIOutputStreamCallback
|
, public nsIOutputStreamCallback
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -201,7 +201,7 @@ private:
|
|||||||
nsCOMPtr<nsIEventTarget> mTarget;
|
nsCOMPtr<nsIEventTarget> mTarget;
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS_INHERITED(nsOutputStreamReadyEvent, nsCancelableRunnable,
|
NS_IMPL_ISUPPORTS_INHERITED(nsOutputStreamReadyEvent, CancelableRunnable,
|
||||||
nsIOutputStreamCallback)
|
nsIOutputStreamCallback)
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -235,7 +235,7 @@ NS_NewOutputStreamReadyEvent(nsIOutputStreamCallback* aCallback,
|
|||||||
class nsAStreamCopier
|
class nsAStreamCopier
|
||||||
: public nsIInputStreamCallback
|
: public nsIInputStreamCallback
|
||||||
, public nsIOutputStreamCallback
|
, public nsIOutputStreamCallback
|
||||||
, public nsCancelableRunnable
|
, public CancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
@ -508,7 +508,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS_INHERITED(nsAStreamCopier,
|
NS_IMPL_ISUPPORTS_INHERITED(nsAStreamCopier,
|
||||||
nsCancelableRunnable,
|
CancelableRunnable,
|
||||||
nsIInputStreamCallback,
|
nsIInputStreamCallback,
|
||||||
nsIOutputStreamCallback)
|
nsIOutputStreamCallback)
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ public:
|
|||||||
// This is a nsICancelableRunnable because we can dispatch it to Workers and
|
// 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
|
// those can be shut down at any time, and in these cases, Cancel() is called
|
||||||
// instead of Run().
|
// instead of Run().
|
||||||
class nsTimerEvent : public nsCancelableRunnable
|
class nsTimerEvent : public CancelableRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NS_IMETHOD Run() override;
|
NS_IMETHOD Run() override;
|
||||||
|
Loading…
Reference in New Issue
Block a user