From f79af753371b5b455c55abadbbb29b2cef1f4cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 28 Feb 2019 06:30:05 +0000 Subject: [PATCH] Bug 1530642 - Added more doc on ProcType and GetProcInfo - r=jesup Added more docs for type synchronization, and about GetProcInfo Differential Revision: https://phabricator.services.mozilla.com/D21205 --HG-- extra : moz-landing-system : lando --- dom/ipc/ContentParent.h | 2 +- toolkit/modules/E10SUtils.jsm | 2 +- widget/ProcInfo.h | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index eb091367939e..ee40ae2e9daf 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -42,7 +42,7 @@ #define CHILD_PROCESS_SHUTDOWN_MESSAGE \ NS_LITERAL_STRING("child-process-shutdown") -// These must match the similar ones in E10SUtils.jsm. +// These must match the similar ones in E10SUtils.jsm and ProcInfo.h. // Process names as reported by about:memory are defined in // ContentChild:RecvRemoteType. Add your value there too or it will be called // "Web Content". diff --git a/toolkit/modules/E10SUtils.jsm b/toolkit/modules/E10SUtils.jsm index a91b16fe51a8..6e8841c93e97 100644 --- a/toolkit/modules/E10SUtils.jsm +++ b/toolkit/modules/E10SUtils.jsm @@ -42,7 +42,7 @@ function getAboutModule(aURL) { const NOT_REMOTE = null; -// These must match any similar ones in ContentParent.h. +// These must match any similar ones in ContentParent.h and ProcInfo.h const WEB_REMOTE_TYPE = "web"; const FILE_REMOTE_TYPE = "file"; const EXTENSION_REMOTE_TYPE = "extension"; diff --git a/widget/ProcInfo.h b/widget/ProcInfo.h index df427cc256cf..aff8612db534 100644 --- a/widget/ProcInfo.h +++ b/widget/ProcInfo.h @@ -66,6 +66,12 @@ struct ProcInfo { typedef MozPromise ProcInfoPromise; +/* + * GetProcInfo() uses a background thread to perform system calls. + * + * Depending on the platform, this call can be quite expensive and the + * promise may return after several ms. + */ RefPtr GetProcInfo(base::ProcessId pid, int32_t childId, const ProcType& type);