diff --git a/dom/base/BodyConsumer.cpp b/dom/base/BodyConsumer.cpp index ca805df60bab..754586a08b42 100644 --- a/dom/base/BodyConsumer.cpp +++ b/dom/base/BodyConsumer.cpp @@ -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()); diff --git a/dom/fetch/Fetch.cpp b/dom/fetch/Fetch.cpp index b7a41be817a4..965daf35ebbd 100644 --- a/dom/fetch/Fetch.cpp +++ b/dom/fetch/Fetch.cpp @@ -792,7 +792,7 @@ class WorkerFetchResponseRunnable final : public MainThreadWorkerRunnable { WorkerFetchResponseRunnable(WorkerPrivate* aWorkerPrivate, WorkerFetchResolver* aResolver, SafeRefPtr 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) {} diff --git a/dom/notification/Notification.cpp b/dom/notification/Notification.cpp index 6295716d7712..39ba7b23fffa 100644 --- a/dom/notification/Notification.cpp +++ b/dom/notification/Notification.cpp @@ -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& 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&& aStrings) - : NotificationWorkerRunnable(aWorkerPrivate), + : NotificationWorkerRunnable(aWorkerPrivate, "WorkerGetResultRunnable"), mPromiseProxy(aPromiseProxy), mStrings(std::move(aStrings)) {} diff --git a/dom/websocket/WebSocket.cpp b/dom/websocket/WebSocket.cpp index 7cfb6ab43791..d0be6e177880 100644 --- a/dom/websocket/WebSocket.cpp +++ b/dom/websocket/WebSocket.cpp @@ -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(); diff --git a/dom/workers/WorkerCSPEventListener.cpp b/dom/workers/WorkerCSPEventListener.cpp index bcfe219cc789..c693928486a4 100644 --- a/dom/workers/WorkerCSPEventListener.cpp +++ b/dom/workers/WorkerCSPEventListener.cpp @@ -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) {