зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1628033 - Add pid to the socket process in about:memory. r=valentin,necko-reviewers
This is modelled on the corresponding code in `RDDParent::RecvRequestMemoryReport()`. Also rename it `Socket` to match other content processes like `GPU` and `RDD`. Differential Revision: https://phabricator.services.mozilla.com/D72995
This commit is contained in:
Родитель
f8a25cc58e
Коммит
fe37816cbd
|
@ -33,6 +33,12 @@
|
|||
#include "ProcessUtils.h"
|
||||
#include "SocketProcessBridgeParent.h"
|
||||
|
||||
#if defined(XP_WIN)
|
||||
# include <process.h>
|
||||
#else
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(XP_LINUX) && defined(MOZ_SANDBOX)
|
||||
# include "mozilla/Sandbox.h"
|
||||
#endif
|
||||
|
@ -156,7 +162,7 @@ mozilla::ipc::IPCResult SocketProcessChild::RecvRequestMemoryReport(
|
|||
const uint32_t& aGeneration, const bool& aAnonymize,
|
||||
const bool& aMinimizeMemoryUsage,
|
||||
const Maybe<ipc::FileDescriptor>& aDMDFile) {
|
||||
nsPrintfCString processName("SocketProcess");
|
||||
nsPrintfCString processName("Socket (pid %u)", (unsigned)getpid());
|
||||
|
||||
mozilla::dom::MemoryReportRequestClient::Start(
|
||||
aGeneration, aAnonymize, aMinimizeMemoryUsage, aDMDFile, processName,
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
numEmptyProcesses++;
|
||||
} else {
|
||||
ok(processes[i].startsWith("Browser (") || processes[i].startsWith("Web Content (") ||
|
||||
(processes[i].startsWith("SocketProcess") && socketProcessRunning),
|
||||
(processes[i].startsWith("Socket (") && socketProcessRunning),
|
||||
"correct non-empty process name prefix: " + processes[i]);
|
||||
numNonEmptyProcesses++;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче