Bug 1577819, part 1 - Rename mozilla::dom::ProcType to mozilla::dom::WebIDLProcType. r=Ehsan
authorAndrew McCreight <continuation@gmail.com>
Fri, 30 Aug 2019 21:52:36 +0000
changeset 490959 01e8fd20bdc19218fc076daa79720c55ed3b7f08
parent 490958 100aaa02891611dc1efbede39a6e99f04ab03989
child 490960 dd470e3dff60dc0e8e7f874cd95d3580503bb4e0
push id94164
push useramccreight@mozilla.com
push dateFri, 30 Aug 2019 21:56:43 +0000
treeherderautoland@98059acdf5be [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersEhsan
bugs1577819
milestone70.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 1577819, part 1 - Rename mozilla::dom::ProcType to mozilla::dom::WebIDLProcType. r=Ehsan There is also a mozilla::ProcType, which makes things confusing. dom::ProcType seems to be used only for passing values to JS via WebIDL, so I put WebIDL in the name. Differential Revision: https://phabricator.services.mozilla.com/D44211
dom/base/ChromeUtils.cpp
dom/chrome-webidl/ChromeUtils.webidl
--- a/dom/base/ChromeUtils.cpp
+++ b/dom/base/ChromeUtils.cpp
@@ -784,17 +784,17 @@ already_AddRefed<Promise> ChromeUtils::R
 
             auto ProcInfoResolver =
                 [domPromise, parentPid, parentInfo = aParentInfo](
                     const nsTArray<ProcInfo>& aChildrenInfo) {
                   mozilla::dom::ParentProcInfoDictionary procInfo;
                   // parent, basic info.
                   procInfo.mPid = parentPid;
                   procInfo.mFilename.Assign(parentInfo.filename);
-                  procInfo.mType = mozilla::dom::ProcType::Browser;
+                  procInfo.mType = mozilla::dom::WebIDLProcType::Browser;
                   procInfo.mVirtualMemorySize = parentInfo.virtualMemorySize;
                   procInfo.mResidentSetSize = parentInfo.residentSetSize;
                   procInfo.mCpuUser = parentInfo.cpuUser;
                   procInfo.mCpuKernel = parentInfo.cpuKernel;
 
                   // parent, threads info.
                   mozilla::dom::Sequence<mozilla::dom::ThreadInfoDictionary>
                       threads;
@@ -817,17 +817,18 @@ already_AddRefed<Promise> ChromeUtils::R
                     ChildProcInfoDictionary* childProcInfo =
                         children.AppendElement(fallible);
                     if (NS_WARN_IF(!childProcInfo)) {
                       domPromise->MaybeReject(NS_ERROR_OUT_OF_MEMORY);
                       return;
                     }
                     // Basic info.
                     childProcInfo->mChildID = info.childId;
-                    childProcInfo->mType = static_cast<ProcType>(info.type);
+                    childProcInfo->mType =
+                        static_cast<WebIDLProcType>(info.type);
                     childProcInfo->mPid = info.pid;
                     childProcInfo->mFilename.Assign(info.filename);
                     childProcInfo->mVirtualMemorySize = info.virtualMemorySize;
                     childProcInfo->mResidentSetSize = info.residentSetSize;
                     childProcInfo->mCpuUser = info.cpuUser;
                     childProcInfo->mCpuKernel = info.cpuKernel;
 
                     // Threads info.
--- a/dom/chrome-webidl/ChromeUtils.webidl
+++ b/dom/chrome-webidl/ChromeUtils.webidl
@@ -432,34 +432,38 @@ partial namespace ChromeUtils {
    * If leak detection is enabled, print a note to the leak log that this
    * process will intentionally crash. This should be called only on child
    * processes for testing purpose.
    */
   [ChromeOnly, Throws]
   void privateNoteIntentionalCrash();
 };
 
-/**
- * Holds information about Firefox running processes & threads.
- *
- * See widget/ProcInfo.h for fields documentation.
+/*
+ * This type is a WebIDL representation of mozilla::ProcType.
  */
-enum ProcType {
+enum WebIDLProcType {
  "web",
  "file",
  "extension",
  "privilegedabout",
  "webLargeAllocation",
  "gpu",
  "rdd",
  "socket",
  "browser",
  "unknown"
 };
 
+/**
+ * These dictionaries hold information about Firefox running processes and
+ * threads.
+ *
+ * See widget/ProcInfo.h for fields documentation.
+ */
 dictionary ThreadInfoDictionary {
   long long tid = 0;
   DOMString name = "";
   unsigned long long cpuUser = 0;
   unsigned long long cpuKernel = 0;
 };
 
 dictionary ChildProcInfoDictionary {
@@ -468,31 +472,31 @@ dictionary ChildProcInfoDictionary {
   DOMString filename = "";
   unsigned long long virtualMemorySize = 0;
   long long residentSetSize = 0;
   unsigned long long cpuUser = 0;
   unsigned long long cpuKernel = 0;
   sequence<ThreadInfoDictionary> threads = [];
   // Firefox info
   unsigned long long ChildID = 0;
-  ProcType type = "web";
+  WebIDLProcType type = "web";
 };
 
 dictionary ParentProcInfoDictionary {
   // System info
   long long pid = 0;
   DOMString filename = "";
   unsigned long long virtualMemorySize = 0;
   long long residentSetSize = 0;
   unsigned long long cpuUser = 0;
   unsigned long long cpuKernel = 0;
   sequence<ThreadInfoDictionary> threads = [];
   sequence<ChildProcInfoDictionary> children = [];
   // Firefox info
-  ProcType type = "browser";
+  WebIDLProcType type = "browser";
 };
 
 /**
  * Dictionaries duplicating IPDL types in dom/ipc/DOMTypes.ipdlh
  * Used by requestPerformanceMetrics
  */
 dictionary MediaMemoryInfoDictionary {
   unsigned long long audioSize = 0;