From d8dc15b323bac1df0de4774050e808c51c0dc3ce Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Fri, 30 Aug 2019 21:52:36 +0000 Subject: [PATCH] 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 --HG-- extra : moz-landing-system : lando --- dom/base/ChromeUtils.cpp | 5 +++-- dom/chrome-webidl/ChromeUtils.webidl | 18 +++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/dom/base/ChromeUtils.cpp b/dom/base/ChromeUtils.cpp index bf2bb0ee0707..6d70bb44aa6e 100644 --- a/dom/base/ChromeUtils.cpp +++ b/dom/base/ChromeUtils.cpp @@ -789,7 +789,7 @@ already_AddRefed ChromeUtils::RequestProcInfo(GlobalObject& aGlobal, // 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; @@ -822,7 +822,8 @@ already_AddRefed ChromeUtils::RequestProcInfo(GlobalObject& aGlobal, } // Basic info. childProcInfo->mChildID = info.childId; - childProcInfo->mType = static_cast(info.type); + childProcInfo->mType = + static_cast(info.type); childProcInfo->mPid = info.pid; childProcInfo->mFilename.Assign(info.filename); childProcInfo->mVirtualMemorySize = info.virtualMemorySize; diff --git a/dom/chrome-webidl/ChromeUtils.webidl b/dom/chrome-webidl/ChromeUtils.webidl index 098d86841222..37604ff449c8 100644 --- a/dom/chrome-webidl/ChromeUtils.webidl +++ b/dom/chrome-webidl/ChromeUtils.webidl @@ -437,12 +437,10 @@ partial namespace ChromeUtils { 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", @@ -455,6 +453,12 @@ enum ProcType { "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 = ""; @@ -473,7 +477,7 @@ dictionary ChildProcInfoDictionary { sequence threads = []; // Firefox info unsigned long long ChildID = 0; - ProcType type = "web"; + WebIDLProcType type = "web"; }; dictionary ParentProcInfoDictionary { @@ -487,7 +491,7 @@ dictionary ParentProcInfoDictionary { sequence threads = []; sequence children = []; // Firefox info - ProcType type = "browser"; + WebIDLProcType type = "browser"; }; /**