mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Bug 1914034 - Expose wrapped runnable name in ExternalRunnableWrapper::GetName and WrappedControlRunnable::GetName r=nika
Differential Revision: https://phabricator.services.mozilla.com/D219687
This commit is contained in:
parent
f63124b846
commit
a503acdd23
@ -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<nsINamed> named = do_QueryInterface(mInner)) {
|
||||
nsAutoCString containedName;
|
||||
named->GetName(containedName);
|
||||
aName.Append(containedName);
|
||||
} else {
|
||||
aName.AppendLiteral("?");
|
||||
}
|
||||
aName.AppendLiteral(")");
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // anonymous namespace
|
||||
|
@ -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<nsINamed> named = do_QueryInterface(mWrappedRunnable)) {
|
||||
nsAutoCString containedName;
|
||||
named->GetName(containedName);
|
||||
aName.Append(containedName);
|
||||
} else {
|
||||
aName.AppendLiteral("?");
|
||||
}
|
||||
aName.AppendLiteral(")");
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
struct WindowAction {
|
||||
|
Loading…
Reference in New Issue
Block a user