diff --git a/dom/workers/WorkerEventTarget.cpp b/dom/workers/WorkerEventTarget.cpp index 94ba7a8097b9..fab73b4ff7d8 100644 --- a/dom/workers/WorkerEventTarget.cpp +++ b/dom/workers/WorkerEventTarget.cpp @@ -67,6 +67,21 @@ class WrappedControlRunnable final : public WorkerControlRunnable { // Cancel() being called. return cr->Cancel(); } + +#ifdef MOZ_COLLECTING_RUNNABLE_TELEMETRY + NS_IMETHOD GetName(nsACString& aName) override { + aName.AssignLiteral("WrappedControlRunnable("); + if (nsCOMPtr named = do_QueryInterface(mInner)) { + nsAutoCString containedName; + named->GetName(containedName); + aName.Append(containedName); + } else { + aName.AppendLiteral("?"); + } + aName.AppendLiteral(")"); + return NS_OK; + } +#endif }; } // anonymous namespace diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index 60831fe3beb8..c9afc76512b6 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -237,6 +237,21 @@ class ExternalRunnableWrapper final : public WorkerThreadRunnable { mWrappedRunnable = nullptr; return NS_OK; } + +#ifdef MOZ_COLLECTING_RUNNABLE_TELEMETRY + NS_IMETHOD GetName(nsACString& aName) override { + aName.AssignLiteral("ExternalRunnableWrapper("); + if (nsCOMPtr named = do_QueryInterface(mWrappedRunnable)) { + nsAutoCString containedName; + named->GetName(containedName); + aName.Append(containedName); + } else { + aName.AppendLiteral("?"); + } + aName.AppendLiteral(")"); + return NS_OK; + } +#endif }; struct WindowAction {