Bug 1806852 - Use nsThread::GetThreadName in the threads memory reporter. r=xpcom-reviewers,emilio

Differential Revision: https://phabricator.services.mozilla.com/D176191
This commit is contained in:
Andrew McCreight 2023-04-21 22:00:55 +00:00
parent 8e9b6d5099
commit b92f264caa

View File

@ -1488,8 +1488,10 @@ class ThreadsReporter final : public nsIMemoryReporter {
"platform");
#endif
nsCString threadName;
thread->GetThreadName(threadName);
threads.AppendElement(ThreadData{
nsCString(PR_GetThreadName(thread->GetPRThread())),
std::move(threadName),
thread->ThreadId(),
// On Linux, it's possible (but unlikely) that our stack region will
// have been merged with adjacent heap regions, in which case we'll