зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1638138 - Restoring missing thread names in requestProcInfo;r=tarek
ChromeUtils::requestProcInfo was dropping thread names for the process process. This patch restores them and tests that at least *one* thread is named. Unfortunately, at the time of this writing, we cannot assume that *all* threads are named. Investigation pending. Differential Revision: https://phabricator.services.mozilla.com/D75420
This commit is contained in:
Родитель
8b359d93c3
Коммит
62b04861d5
|
@ -946,6 +946,7 @@ already_AddRefed<Promise> ChromeUtils::RequestProcInfo(GlobalObject& aGlobal,
|
|||
thread->mCpuUser = entry.cpuUser;
|
||||
thread->mCpuKernel = entry.cpuKernel;
|
||||
thread->mTid = entry.tid;
|
||||
thread->mName.Assign(entry.name);
|
||||
}
|
||||
procInfo.mThreads = std::move(threads);
|
||||
|
||||
|
|
|
@ -31,6 +31,11 @@ add_task(async function test_proc_info() {
|
|||
cpuThreads += parentProc.threads[x].cpuUser;
|
||||
}
|
||||
|
||||
Assert.ok(
|
||||
parentProc.threads.some(thread => thread.name),
|
||||
"At least one of the threads of the parent process is named"
|
||||
);
|
||||
|
||||
for (var i = 0; i < parentProc.children.length; i++) {
|
||||
let childProc = parentProc.children[i];
|
||||
Assert.notEqual(
|
||||
|
|
Загрузка…
Ссылка в новой задаче