Bug 1405290 - Improve logging of workers when shutting down - part 3 - WorkerHolder with names, r=asuth
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 15 Nov 2017 07:58:38 +0100
changeset 391956 dec3b1ceaa9ba6490d9b5af85e90106abc3e9a06
parent 391955 bb508b270fab5a74c12270da0dd736ade0914659
child 391957 cec4f6e0be0020eac30ee723eb1ddf3641e54c06
push id32909
push usercbrindusan@mozilla.com
push dateWed, 15 Nov 2017 22:25:14 +0000
treeherdermozilla-central@f41930a869a8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth
bugs1405290
milestone59.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 1405290 - Improve logging of workers when shutting down - part 3 - WorkerHolder with names, r=asuth
dom/base/EventSource.cpp
dom/broadcastchannel/BroadcastChannel.cpp
dom/cache/CacheWorkerHolder.cpp
dom/crypto/WebCryptoTask.cpp
dom/fetch/FetchConsumer.cpp
dom/fetch/FetchStream.cpp
dom/fetch/FetchStreamReader.cpp
dom/fetch/FetchUtil.cpp
dom/file/FileReader.cpp
dom/file/ipc/IPCBlobInputStreamChild.cpp
dom/indexedDB/IDBRequest.cpp
dom/indexedDB/IDBTransaction.cpp
dom/messagechannel/MessagePort.cpp
dom/network/ConnectionWorker.cpp
dom/notification/Notification.cpp
dom/promise/Promise.cpp
dom/websocket/WebSocket.cpp
dom/workers/ScriptLoader.cpp
dom/workers/ServiceWorkerPrivate.cpp
dom/workers/ServiceWorkerRegistration.cpp
dom/workers/WorkerHolder.cpp
dom/workers/WorkerHolderToken.cpp
dom/workers/WorkerPrivate.cpp
dom/workers/WorkerRunnable.cpp
dom/xhr/XMLHttpRequestWorker.cpp
ipc/glue/IPCStreamSource.cpp
--- a/dom/base/EventSource.cpp
+++ b/dom/base/EventSource.cpp
@@ -1778,17 +1778,18 @@ EventSourceImpl::ReleaseObject()
   Release();
 }
 
 namespace {
 class EventSourceWorkerHolder final : public WorkerHolder
 {
 public:
   explicit EventSourceWorkerHolder(EventSourceImpl* aEventSourceImpl)
-    : mEventSourceImpl(aEventSourceImpl)
+    : WorkerHolder("EventSourceWorkerHolder")
+    , mEventSourceImpl(aEventSourceImpl)
   {
   }
 
   bool Notify(Status aStatus) override
   {
     MOZ_ASSERT(aStatus > workers::Running);
     if (aStatus >= Canceling) {
       mEventSourceImpl->Close();
--- a/dom/broadcastchannel/BroadcastChannel.cpp
+++ b/dom/broadcastchannel/BroadcastChannel.cpp
@@ -235,17 +235,18 @@ private:
 NS_IMPL_ISUPPORTS(TeardownRunnable, nsICancelableRunnable, nsIRunnable)
 
 class BroadcastChannelWorkerHolder final : public workers::WorkerHolder
 {
   BroadcastChannel* mChannel;
 
 public:
   explicit BroadcastChannelWorkerHolder(BroadcastChannel* aChannel)
-    : mChannel(aChannel)
+    : workers::WorkerHolder("BroadcastChannelWorkerHolder")
+    , mChannel(aChannel)
   {
     MOZ_COUNT_CTOR(BroadcastChannelWorkerHolder);
   }
 
   virtual bool Notify(workers::Status aStatus) override
   {
     if (aStatus >= Closing) {
       mChannel->Shutdown();
--- a/dom/cache/CacheWorkerHolder.cpp
+++ b/dom/cache/CacheWorkerHolder.cpp
@@ -111,17 +111,17 @@ CacheWorkerHolder::Notify(Status aStatus
     MOZ_DIAGNOSTIC_ASSERT(mActorList[i]);
     mActorList[i]->StartDestroy();
   }
 
   return true;
 }
 
 CacheWorkerHolder::CacheWorkerHolder(Behavior aBehavior)
-  : WorkerHolder(aBehavior)
+  : WorkerHolder("CacheWorkerHolder", aBehavior)
   , mNotified(false)
 {
 }
 
 CacheWorkerHolder::~CacheWorkerHolder()
 {
   NS_ASSERT_OWNINGTHREAD(CacheWorkerHolder);
   MOZ_DIAGNOSTIC_ASSERT(mActorList.IsEmpty());
--- a/dom/crypto/WebCryptoTask.cpp
+++ b/dom/crypto/WebCryptoTask.cpp
@@ -139,16 +139,17 @@ public:
 
 private:
   JSContext* mCx;
 };
 
 class WebCryptoTask::InternalWorkerHolder final : public WorkerHolder
 {
   InternalWorkerHolder()
+    : WorkerHolder("WebCryptoTask::InternalWorkerHolder")
   { }
 
   ~InternalWorkerHolder()
   {
     NS_ASSERT_OWNINGTHREAD(InternalWorkerHolder);
     // Nothing to do here since the parent destructor releases the
     // worker automatically.
   }
--- a/dom/fetch/FetchConsumer.cpp
+++ b/dom/fetch/FetchConsumer.cpp
@@ -24,17 +24,18 @@ namespace {
 template <class Derived>
 class FetchBodyWorkerHolder final : public workers::WorkerHolder
 {
   RefPtr<FetchBodyConsumer<Derived>> mConsumer;
   bool mWasNotified;
 
 public:
   explicit FetchBodyWorkerHolder(FetchBodyConsumer<Derived>* aConsumer)
-    : mConsumer(aConsumer)
+    : workers::WorkerHolder("FetchBodyWorkerHolder")
+    , mConsumer(aConsumer)
     , mWasNotified(false)
   {
     MOZ_ASSERT(aConsumer);
   }
 
   ~FetchBodyWorkerHolder() = default;
 
   bool Notify(workers::Status aStatus) override
--- a/dom/fetch/FetchStream.cpp
+++ b/dom/fetch/FetchStream.cpp
@@ -23,17 +23,18 @@ namespace dom {
 using namespace workers;
 
 namespace {
 
 class FetchStreamWorkerHolder final : public WorkerHolder
 {
 public:
   explicit FetchStreamWorkerHolder(FetchStream* aStream)
-    : WorkerHolder(WorkerHolder::Behavior::AllowIdleShutdownStart)
+    : WorkerHolder("FetchStreamWorkerHolder",
+                   WorkerHolder::Behavior::AllowIdleShutdownStart)
     , mStream(aStream)
     , mWasNotified(false)
   {}
 
   bool Notify(Status aStatus) override
   {
     if (!mWasNotified) {
       mWasNotified = true;
--- a/dom/fetch/FetchStreamReader.cpp
+++ b/dom/fetch/FetchStreamReader.cpp
@@ -19,17 +19,18 @@ namespace dom {
 using namespace workers;
 
 namespace {
 
 class FetchStreamReaderWorkerHolder final : public WorkerHolder
 {
 public:
   explicit FetchStreamReaderWorkerHolder(FetchStreamReader* aReader)
-    : WorkerHolder(WorkerHolder::Behavior::AllowIdleShutdownStart)
+    : WorkerHolder("FetchStreamReaderWorkerHolder",
+                   WorkerHolder::Behavior::AllowIdleShutdownStart)
     , mReader(aReader)
     , mWasNotified(false)
   {}
 
   bool Notify(Status aStatus) override
   {
     if (!mWasNotified) {
       mWasNotified = true;
--- a/dom/fetch/FetchUtil.cpp
+++ b/dom/fetch/FetchUtil.cpp
@@ -269,17 +269,18 @@ NS_IMPL_ISUPPORTS(WindowStreamOwner, nsI
 class WorkerStreamOwner final : public WorkerHolder
 {
   // Read from any thread but only set/cleared on the worker thread. The
   // lifecycle of WorkerStreamOwner prevents concurrent read/clear.
   nsCOMPtr<nsIAsyncInputStream> mStream;
 
 public:
   explicit WorkerStreamOwner(nsIAsyncInputStream* aStream)
-    : WorkerHolder(WorkerHolder::Behavior::AllowIdleShutdownStart)
+    : WorkerHolder("WorkerStreamOwner",
+                   WorkerHolder::Behavior::AllowIdleShutdownStart)
     , mStream(aStream)
   {}
 
   static UniquePtr<WorkerStreamOwner>
   Create(nsIAsyncInputStream* aStream, WorkerPrivate* aWorker)
   {
     auto self = MakeUnique<WorkerStreamOwner>(aStream);
 
--- a/dom/file/FileReader.cpp
+++ b/dom/file/FileReader.cpp
@@ -98,16 +98,17 @@ FileReader::RootResultArrayBuffer()
   mozilla::HoldJSObjects(this);
 }
 
 //FileReader constructors/initializers
 
 FileReader::FileReader(nsIGlobalObject* aGlobal,
                        WorkerPrivate* aWorkerPrivate)
   : DOMEventTargetHelper(aGlobal)
+  , WorkerHolder("FileReader")
   , mFileData(nullptr)
   , mDataLen(0)
   , mDataFormat(FILE_AS_BINARY)
   , mResultArrayBuffer(nullptr)
   , mProgressEventWasDelayed(false)
   , mTimerIsActive(false)
   , mReadyState(EMPTY)
   , mTotal(0)
--- a/dom/file/ipc/IPCBlobInputStreamChild.cpp
+++ b/dom/file/ipc/IPCBlobInputStreamChild.cpp
@@ -90,16 +90,20 @@ public:
 private:
   RefPtr<IPCBlobInputStream> mDestinationStream;
   nsCOMPtr<nsIInputStream> mCreatedStream;
 };
 
 class IPCBlobInputStreamWorkerHolder final : public WorkerHolder
 {
 public:
+  IPCBlobInputStreamWorkerHolder()
+    : WorkerHolder("IPCBlobInputStreamWorkerHolder")
+  {}
+
   bool Notify(Status aStatus) override
   {
     // We must keep the worker alive until the migration is completed.
     return true;
   }
 };
 
 class ReleaseWorkerHolderRunnable final : public CancelableRunnable
--- a/dom/indexedDB/IDBRequest.cpp
+++ b/dom/indexedDB/IDBRequest.cpp
@@ -423,17 +423,18 @@ class IDBOpenDBRequest::WorkerHolder fin
   // This is only here so that assertions work in the destructor even if
   // NoteAddWorkerHolderFailed was called.
   WorkerPrivate* mWorkerPrivateDEBUG;
 #endif
 
 public:
   explicit
   WorkerHolder(WorkerPrivate* aWorkerPrivate)
-    : mWorkerPrivate(aWorkerPrivate)
+    : mozilla::dom::workers::WorkerHolder("IDBOpenDBRequest::WorkerHolder")
+    , mWorkerPrivate(aWorkerPrivate)
 #ifdef DEBUG
     , mWorkerPrivateDEBUG(aWorkerPrivate)
 #endif
   {
     MOZ_ASSERT(aWorkerPrivate);
     aWorkerPrivate->AssertIsOnWorkerThread();
 
     MOZ_COUNT_CTOR(IDBOpenDBRequest::WorkerHolder);
--- a/dom/indexedDB/IDBTransaction.cpp
+++ b/dom/indexedDB/IDBTransaction.cpp
@@ -42,17 +42,18 @@ class IDBTransaction::WorkerHolder final
   WorkerPrivate* mWorkerPrivate;
 
   // The IDBTransaction owns this object so we only need a weak reference back
   // to it.
   IDBTransaction* mTransaction;
 
 public:
   WorkerHolder(WorkerPrivate* aWorkerPrivate, IDBTransaction* aTransaction)
-    : mWorkerPrivate(aWorkerPrivate)
+    : mozilla::dom::workers::WorkerHolder("IDBTransaction::WorkerHolder")
+    , mWorkerPrivate(aWorkerPrivate)
     , mTransaction(aTransaction)
   {
     MOZ_ASSERT(aWorkerPrivate);
     MOZ_ASSERT(aTransaction);
     aWorkerPrivate->AssertIsOnWorkerThread();
     aTransaction->AssertIsOnOwningThread();
 
     MOZ_COUNT_CTOR(IDBTransaction::WorkerHolder);
--- a/dom/messagechannel/MessagePort.cpp
+++ b/dom/messagechannel/MessagePort.cpp
@@ -205,17 +205,18 @@ NS_IMPL_RELEASE_INHERITED(MessagePort, D
 namespace {
 
 class MessagePortWorkerHolder final : public workers::WorkerHolder
 {
   MessagePort* mPort;
 
 public:
   explicit MessagePortWorkerHolder(MessagePort* aPort)
-    : mPort(aPort)
+    : workers::WorkerHolder("MessagePortWorkerHolder")
+    , mPort(aPort)
   {
     MOZ_ASSERT(aPort);
     MOZ_COUNT_CTOR(MessagePortWorkerHolder);
   }
 
   virtual bool Notify(workers::Status aStatus) override
   {
     if (aStatus > Running) {
--- a/dom/network/ConnectionWorker.cpp
+++ b/dom/network/ConnectionWorker.cpp
@@ -48,17 +48,18 @@ public:
   {
     MOZ_ASSERT(mConnection);
     mWorkerPrivate->AssertIsOnWorkerThread();
     mConnection->Update(aType, aIsWifi, aDHCPGateway, true);
   }
 
 private:
   ConnectionProxy(WorkerPrivate* aWorkerPrivate, ConnectionWorker* aConnection)
-    : mConnection(aConnection)
+    : WorkerHolder("ConnectionProxy")
+    , mConnection(aConnection)
     , mWorkerPrivate(aWorkerPrivate)
   {
     MOZ_ASSERT(mWorkerPrivate);
     MOZ_ASSERT(mConnection);
     mWorkerPrivate->AssertIsOnWorkerThread();
   }
 
   ~ConnectionProxy() = default;
--- a/dom/notification/Notification.cpp
+++ b/dom/notification/Notification.cpp
@@ -2377,17 +2377,18 @@ Notification::ReleaseObject()
   --mTaskCount;
   if (mWorkerPrivate && mTaskCount == 0) {
     UnregisterWorkerHolder();
   }
   Release();
 }
 
 NotificationWorkerHolder::NotificationWorkerHolder(Notification* aNotification)
-  : mNotification(aNotification)
+  : WorkerHolder("NotificationWorkerHolder")
+  , mNotification(aNotification)
 {
   MOZ_ASSERT(mNotification->mWorkerPrivate);
   mNotification->mWorkerPrivate->AssertIsOnWorkerThread();
 }
 
 /*
  * Called from the worker, runs on main thread, blocks worker.
  *
--- a/dom/promise/Promise.cpp
+++ b/dom/promise/Promise.cpp
@@ -691,17 +691,18 @@ private:
 
 class PromiseWorkerHolder final : public WorkerHolder
 {
   // RawPointer because this proxy keeps alive the holder.
   PromiseWorkerProxy* mProxy;
 
 public:
   explicit PromiseWorkerHolder(PromiseWorkerProxy* aProxy)
-    : mProxy(aProxy)
+    : WorkerHolder("PromiseWorkerHolder")
+    , mProxy(aProxy)
   {
     MOZ_ASSERT(aProxy);
   }
 
   bool
   Notify(Status aStatus) override
   {
     if (aStatus >= Canceling) {
--- a/dom/websocket/WebSocket.cpp
+++ b/dom/websocket/WebSocket.cpp
@@ -2250,17 +2250,18 @@ WebSocket::DontKeepAliveAnyMore()
 }
 
 namespace {
 
 class WebSocketWorkerHolder final : public WorkerHolder
 {
 public:
   explicit WebSocketWorkerHolder(WebSocketImpl* aWebSocketImpl)
-    : mWebSocketImpl(aWebSocketImpl)
+    : WorkerHolder("WebSocketWorkerHolder")
+    , mWebSocketImpl(aWebSocketImpl)
   {
   }
 
   bool Notify(Status aStatus) override
   {
     MOZ_ASSERT(aStatus > workers::Running);
 
     if (aStatus >= Canceling) {
--- a/dom/workers/ScriptLoader.cpp
+++ b/dom/workers/ScriptLoader.cpp
@@ -1366,17 +1366,18 @@ NS_IMPL_ISUPPORTS(ScriptLoaderRunnable, 
 
 class MOZ_STACK_CLASS ScriptLoaderHolder final : public WorkerHolder
 {
   // Raw pointer because this holder object follows the mRunnable life-time.
   ScriptLoaderRunnable* mRunnable;
 
 public:
   explicit ScriptLoaderHolder(ScriptLoaderRunnable* aRunnable)
-    : mRunnable(aRunnable)
+    : WorkerHolder("ScriptLoaderHolder")
+    , mRunnable(aRunnable)
   {
     MOZ_ASSERT(aRunnable);
   }
 
   virtual bool
   Notify(Status aStatus) override
   {
     mRunnable->Notify(aStatus);
--- a/dom/workers/ServiceWorkerPrivate.cpp
+++ b/dom/workers/ServiceWorkerPrivate.cpp
@@ -250,17 +250,18 @@ class KeepAliveHandler final : public Wo
   // any of them were rejected.
   bool mRejected;
 
 public:
   NS_DECL_ISUPPORTS
 
   explicit KeepAliveHandler(const nsMainThreadPtrHandle<KeepAliveToken>& aKeepAliveToken,
                             ExtendableEventCallback* aCallback)
-    : mKeepAliveToken(aKeepAliveToken)
+    : WorkerHolder("KeepAliveHolder")
+    , mKeepAliveToken(aKeepAliveToken)
     , mWorkerPrivate(GetCurrentThreadWorkerPrivate())
     , mWorkerHolderAdded(false)
     , mCallback(aCallback)
     , mPendingPromisesCount(0)
     , mRejected(false)
   {
     MOZ_ASSERT(mKeepAliveToken);
     MOZ_ASSERT(mWorkerPrivate);
@@ -689,17 +690,18 @@ class LifeCycleEventWatcher final : publ
     ReportResult(false);
   }
 
 public:
   NS_INLINE_DECL_REFCOUNTING(LifeCycleEventWatcher, override)
 
   LifeCycleEventWatcher(WorkerPrivate* aWorkerPrivate,
                         LifeCycleEventCallback* aCallback)
-    : mWorkerPrivate(aWorkerPrivate)
+    : WorkerHolder("LifeCycleEventWatcher")
+    , mWorkerPrivate(aWorkerPrivate)
     , mCallback(aCallback)
     , mDone(false)
   {
     MOZ_ASSERT(aWorkerPrivate);
     aWorkerPrivate->AssertIsOnWorkerThread();
   }
 
   bool
@@ -1153,16 +1155,17 @@ class AllowWindowInteractionHandler fina
     ClearWindowAllowed(mWorkerPrivate);
     return true;
   }
 
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
   explicit AllowWindowInteractionHandler(WorkerPrivate* aWorkerPrivate)
+    : WorkerHolder("AllowWindowInteractionHandler")
   {
     StartClearWindowTimer(aWorkerPrivate);
   }
 
   void
   FinishedWithResult(ExtendableEventResult /* aResult */) override
   {
     WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
--- a/dom/workers/ServiceWorkerRegistration.cpp
+++ b/dom/workers/ServiceWorkerRegistration.cpp
@@ -1116,16 +1116,17 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_IN
                                                 ServiceWorkerRegistration)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mPushManager)
   tmp->ReleaseListener();
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 ServiceWorkerRegistrationWorkerThread::ServiceWorkerRegistrationWorkerThread(WorkerPrivate* aWorkerPrivate,
                                                                              const nsAString& aScope)
   : ServiceWorkerRegistration(nullptr, aScope)
+  , WorkerHolder("ServiceWorkerRegistrationWorkerThread")
   , mWorkerPrivate(aWorkerPrivate)
 {
   InitListener();
 }
 
 ServiceWorkerRegistrationWorkerThread::~ServiceWorkerRegistrationWorkerThread()
 {
   ReleaseListener();
--- a/dom/workers/WorkerHolder.cpp
+++ b/dom/workers/WorkerHolder.cpp
@@ -17,20 +17,20 @@ AssertOnOwningThread(void* aThread)
   if (MOZ_UNLIKELY(aThread != GetCurrentVirtualThread())) {
     MOZ_CRASH_UNSAFE_OOL("WorkerHolder on the wrong thread.");
   }
 }
 
 } // anonymous
 
 WorkerHolder::WorkerHolder(const char* aName, Behavior aBehavior)
-  : mName(aName)
-  , mWorkerPrivate(nullptr)
+  : mWorkerPrivate(nullptr)
   , mBehavior(aBehavior)
   , mThread(GetCurrentVirtualThread())
+  , mName(aName)
 {
 }
 
 WorkerHolder::~WorkerHolder()
 {
   AssertOnOwningThread(mThread);
   ReleaseWorkerInternal();
   MOZ_ASSERT(mWorkerPrivate == nullptr);
--- a/dom/workers/WorkerHolderToken.cpp
+++ b/dom/workers/WorkerHolderToken.cpp
@@ -68,17 +68,17 @@ WorkerPrivate*
 WorkerHolderToken::GetWorkerPrivate() const
 {
   NS_ASSERT_OWNINGTHREAD(WorkerHolderToken);
   return mWorkerPrivate;
 }
 
 WorkerHolderToken::WorkerHolderToken(Status aShutdownStatus,
                                      Behavior aBehavior)
-  : WorkerHolder(aBehavior)
+  : WorkerHolder("WorkerHolderToken", aBehavior)
   , mShutdownStatus(aShutdownStatus)
   , mShuttingDown(false)
 {
 }
 
 WorkerHolderToken::~WorkerHolderToken()
 {
   NS_ASSERT_OWNINGTHREAD(WorkerHolderToken);
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -1595,16 +1595,20 @@ PRThreadFromThread(nsIThread* aThread)
   MOZ_ASSERT(result);
 
   return result;
 }
 
 class SimpleWorkerHolder final : public WorkerHolder
 {
 public:
+  SimpleWorkerHolder()
+    : WorkerHolder("SimpleWorkerHolder")
+  {}
+
   virtual bool Notify(Status aStatus) { return true; }
 };
 
 } /* anonymous namespace */
 
 NS_IMPL_ISUPPORTS_INHERITED0(MainThreadReleaseRunnable, Runnable)
 
 NS_IMPL_ISUPPORTS_INHERITED0(TopLevelWorkerFinishedRunnable, Runnable)
--- a/dom/workers/WorkerRunnable.cpp
+++ b/dom/workers/WorkerRunnable.cpp
@@ -759,16 +759,20 @@ bool
 WorkerProxyToMainThreadRunnable::HoldWorker()
 {
   mWorkerPrivate->AssertIsOnWorkerThread();
   MOZ_ASSERT(!mWorkerHolder);
 
   class SimpleWorkerHolder final : public WorkerHolder
   {
   public:
+    SimpleWorkerHolder()
+      : WorkerHolder("WorkerProxyToMainThreadRunnable::SimpleWorkerHolder")
+    {}
+
     bool Notify(Status aStatus) override
     {
       // We don't care about the notification. We just want to keep the
       // mWorkerPrivate alive.
       return true;
     }
   };
 
--- a/dom/xhr/XMLHttpRequestWorker.cpp
+++ b/dom/xhr/XMLHttpRequestWorker.cpp
@@ -1528,17 +1528,17 @@ SendRunnable::RunOnMainThread(ErrorResul
           !mProxy->AddRemoveEventListeners(true, true)) {
         MOZ_ASSERT(false, "This should never fail!");
       }
     }
   }
 }
 
 XMLHttpRequestWorker::XMLHttpRequestWorker(WorkerPrivate* aWorkerPrivate)
-: mWorkerPrivate(aWorkerPrivate),
+: WorkerHolder("XMLHttpRequestWorker"), mWorkerPrivate(aWorkerPrivate),
   mResponseType(XMLHttpRequestResponseType::Text), mTimeout(0),
   mRooted(false), mBackgroundRequest(false), mWithCredentials(false),
   mCanceled(false), mMozAnon(false), mMozSystem(false)
 {
   mWorkerPrivate->AssertIsOnWorkerThread();
 
   mozilla::HoldJSObjects(this);
 }
--- a/ipc/glue/IPCStreamSource.cpp
+++ b/ipc/glue/IPCStreamSource.cpp
@@ -99,17 +99,18 @@ private:
   NS_DECL_THREADSAFE_ISUPPORTS
 };
 
 NS_IMPL_ISUPPORTS(IPCStreamSource::Callback, nsIInputStreamCallback,
                                              nsIRunnable,
                                              nsICancelableRunnable);
 
 IPCStreamSource::IPCStreamSource(nsIAsyncInputStream* aInputStream)
-  : mStream(aInputStream)
+  : WorkerHolder("IPCStreamSource")
+  , mStream(aInputStream)
   , mWorkerPrivate(nullptr)
   , mState(ePending)
 {
   MOZ_ASSERT(aInputStream);
 }
 
 IPCStreamSource::~IPCStreamSource()
 {