forked from mirrors/gecko-dev
Bug 1880233 - Add names to MainThreadWorkerRunnable derived runnables. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D201812
This commit is contained in:
parent
143dc3245c
commit
a4a855b0e3
5 changed files with 23 additions and 13 deletions
|
|
@ -74,7 +74,7 @@ class ContinueConsumeBodyRunnable final : public MainThreadWorkerRunnable {
|
|||
ContinueConsumeBodyRunnable(BodyConsumer* aBodyConsumer,
|
||||
WorkerPrivate* aWorkerPrivate, nsresult aStatus,
|
||||
uint32_t aLength, uint8_t* aResult)
|
||||
: MainThreadWorkerRunnable(aWorkerPrivate),
|
||||
: MainThreadWorkerRunnable(aWorkerPrivate, "ContinueConsumeBodyRunnable"),
|
||||
mBodyConsumer(aBodyConsumer),
|
||||
mStatus(aStatus),
|
||||
mLength(aLength),
|
||||
|
|
@ -159,7 +159,8 @@ class ContinueConsumeBlobBodyRunnable final : public MainThreadWorkerRunnable {
|
|||
ContinueConsumeBlobBodyRunnable(BodyConsumer* aBodyConsumer,
|
||||
WorkerPrivate* aWorkerPrivate,
|
||||
BlobImpl* aBlobImpl)
|
||||
: MainThreadWorkerRunnable(aWorkerPrivate),
|
||||
: MainThreadWorkerRunnable(aWorkerPrivate,
|
||||
"ContinueConsumeBlobBodyRunnable"),
|
||||
mBodyConsumer(aBodyConsumer),
|
||||
mBlobImpl(aBlobImpl) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
|
|
|||
|
|
@ -792,7 +792,7 @@ class WorkerFetchResponseRunnable final : public MainThreadWorkerRunnable {
|
|||
WorkerFetchResponseRunnable(WorkerPrivate* aWorkerPrivate,
|
||||
WorkerFetchResolver* aResolver,
|
||||
SafeRefPtr<InternalResponse> aResponse)
|
||||
: MainThreadWorkerRunnable(aWorkerPrivate),
|
||||
: MainThreadWorkerRunnable(aWorkerPrivate, "WorkerFetchResponseRunnable"),
|
||||
mResolver(aResolver),
|
||||
mInternalResponse(std::move(aResponse)) {
|
||||
MOZ_ASSERT(mResolver);
|
||||
|
|
@ -848,7 +848,8 @@ class WorkerDataAvailableRunnable final : public MainThreadWorkerRunnable {
|
|||
public:
|
||||
WorkerDataAvailableRunnable(WorkerPrivate* aWorkerPrivate,
|
||||
WorkerFetchResolver* aResolver)
|
||||
: MainThreadWorkerRunnable(aWorkerPrivate), mResolver(aResolver) {}
|
||||
: MainThreadWorkerRunnable(aWorkerPrivate, "WorkerDataAvailableRunnable"),
|
||||
mResolver(aResolver) {}
|
||||
|
||||
bool WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override {
|
||||
MOZ_ASSERT(aWorkerPrivate);
|
||||
|
|
@ -888,7 +889,8 @@ class WorkerFetchResponseEndRunnable final : public MainThreadWorkerRunnable,
|
|||
WorkerFetchResponseEndRunnable(WorkerPrivate* aWorkerPrivate,
|
||||
WorkerFetchResolver* aResolver,
|
||||
FetchDriverObserver::EndReason aReason)
|
||||
: MainThreadWorkerRunnable(aWorkerPrivate),
|
||||
: MainThreadWorkerRunnable(aWorkerPrivate,
|
||||
"WorkerFetchResponseEndRunnable"),
|
||||
WorkerFetchResponseEndBase(aResolver),
|
||||
mReason(aReason) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -307,8 +307,10 @@ nsresult CheckScope(nsIPrincipal* aPrincipal, const nsACString& aScope,
|
|||
// thread.
|
||||
class NotificationWorkerRunnable : public MainThreadWorkerRunnable {
|
||||
protected:
|
||||
explicit NotificationWorkerRunnable(WorkerPrivate* aWorkerPrivate)
|
||||
: MainThreadWorkerRunnable(aWorkerPrivate) {}
|
||||
explicit NotificationWorkerRunnable(
|
||||
WorkerPrivate* aWorkerPrivate,
|
||||
const char* aName = "NotificationWorkerRunnable")
|
||||
: MainThreadWorkerRunnable(aWorkerPrivate, aName) {}
|
||||
|
||||
bool WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override {
|
||||
aWorkerPrivate->AssertIsOnWorkerThread();
|
||||
|
|
@ -336,7 +338,8 @@ class NotificationEventWorkerRunnable final
|
|||
public:
|
||||
NotificationEventWorkerRunnable(Notification* aNotification,
|
||||
const nsString& aEventName)
|
||||
: NotificationWorkerRunnable(aNotification->mWorkerPrivate),
|
||||
: NotificationWorkerRunnable(aNotification->mWorkerPrivate,
|
||||
"NotificationEventWorkerRunnable"),
|
||||
mNotification(aNotification),
|
||||
mEventName(aEventName) {}
|
||||
|
||||
|
|
@ -350,7 +353,8 @@ class ReleaseNotificationRunnable final : public NotificationWorkerRunnable {
|
|||
|
||||
public:
|
||||
explicit ReleaseNotificationRunnable(Notification* aNotification)
|
||||
: NotificationWorkerRunnable(aNotification->mWorkerPrivate),
|
||||
: NotificationWorkerRunnable(aNotification->mWorkerPrivate,
|
||||
"ReleaseNotificationRunnable"),
|
||||
mNotification(aNotification) {}
|
||||
|
||||
bool WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override {
|
||||
|
|
@ -1052,7 +1056,8 @@ class NotificationClickWorkerRunnable final
|
|||
NotificationClickWorkerRunnable(
|
||||
Notification* aNotification,
|
||||
const nsMainThreadPtrHandle<nsPIDOMWindowInner>& aWindow)
|
||||
: NotificationWorkerRunnable(aNotification->mWorkerPrivate),
|
||||
: NotificationWorkerRunnable(aNotification->mWorkerPrivate,
|
||||
"NotificationClickWorkerRunnable"),
|
||||
mNotification(aNotification),
|
||||
mWindow(aWindow) {
|
||||
MOZ_ASSERT_IF(mWorkerPrivate->IsServiceWorker(), !mWindow);
|
||||
|
|
@ -1695,7 +1700,7 @@ class WorkerGetResultRunnable final : public NotificationWorkerRunnable {
|
|||
WorkerGetResultRunnable(WorkerPrivate* aWorkerPrivate,
|
||||
PromiseWorkerProxy* aPromiseProxy,
|
||||
nsTArray<NotificationStrings>&& aStrings)
|
||||
: NotificationWorkerRunnable(aWorkerPrivate),
|
||||
: NotificationWorkerRunnable(aWorkerPrivate, "WorkerGetResultRunnable"),
|
||||
mPromiseProxy(aPromiseProxy),
|
||||
mStrings(std::move(aStrings)) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -2639,7 +2639,8 @@ namespace {
|
|||
class CancelRunnable final : public MainThreadWorkerRunnable {
|
||||
public:
|
||||
CancelRunnable(ThreadSafeWorkerRef* aWorkerRef, WebSocketImpl* aImpl)
|
||||
: MainThreadWorkerRunnable(aWorkerRef->Private()), mImpl(aImpl) {}
|
||||
: MainThreadWorkerRunnable(aWorkerRef->Private(), "CancelRunnable"),
|
||||
mImpl(aImpl) {}
|
||||
|
||||
bool WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override {
|
||||
aWorkerPrivate->AssertIsOnWorkerThread();
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ namespace {
|
|||
class WorkerCSPEventRunnable final : public MainThreadWorkerRunnable {
|
||||
public:
|
||||
WorkerCSPEventRunnable(WorkerPrivate* aWorkerPrivate, const nsAString& aJSON)
|
||||
: MainThreadWorkerRunnable(aWorkerPrivate), mJSON(aJSON) {}
|
||||
: MainThreadWorkerRunnable(aWorkerPrivate, "WorkerCSPEventRunnable"),
|
||||
mJSON(aJSON) {}
|
||||
|
||||
private:
|
||||
bool WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue