Bug 1530642 - Added more doc on ProcType and GetProcInfo - r=jesup
authorTarek Ziadé <tarek@mozilla.com>
Thu, 28 Feb 2019 06:30:05 +0000
changeset 461595 3a00ca524ad127725835b3629f00cf2861f977cb
parent 461594 de132128473b4973ba81fb84a75ee87f2ae55b7b
child 461596 cd0319771873a7a0acd613d4e6ee38d0eb3ce174
push id35625
push usercsabou@mozilla.com
push dateThu, 28 Feb 2019 10:55:23 +0000
treeherdermozilla-central@fd53d5e80bca [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1530642
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
dom/ipc/ContentParent.h
toolkit/modules/E10SUtils.jsm
widget/ProcInfo.h
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -37,17 +37,17 @@
 #include "nsIDOMGeoPositionErrorCallback.h"
 #include "nsRefPtrHashtable.h"
 #include "PermissionMessageUtils.h"
 #include "DriverCrashGuard.h"
 
 #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".
 #define DEFAULT_REMOTE_TYPE "web"
 #define FILE_REMOTE_TYPE "file"
 #define EXTENSION_REMOTE_TYPE "extension"
 #define PRIVILEGED_REMOTE_TYPE "privileged"
 
--- a/toolkit/modules/E10SUtils.jsm
+++ b/toolkit/modules/E10SUtils.jsm
@@ -37,17 +37,17 @@ function getAboutModule(aURL) {
     // Either the about module isn't defined or it is broken. In either case
     // ignore it.
     return null;
   }
 }
 
 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";
 const PRIVILEGED_REMOTE_TYPE = "privileged";
 
 // This must start with the WEB_REMOTE_TYPE above.
 const LARGE_ALLOCATION_REMOTE_TYPE = "webLargeAllocation";
 const DEFAULT_REMOTE_TYPE = WEB_REMOTE_TYPE;
--- a/widget/ProcInfo.h
+++ b/widget/ProcInfo.h
@@ -61,13 +61,19 @@ struct ProcInfo {
   // System time in ns.
   uint64_t cpuKernel = 0;
   // Threads owned by this process.
   nsTArray<ThreadInfo> threads;
 };
 
 typedef MozPromise<ProcInfo, nsresult, true> 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<ProcInfoPromise> GetProcInfo(base::ProcessId pid, int32_t childId,
                                     const ProcType& type);
 
 }  // namespace mozilla
 #endif  // ProcInfo_h