Bug 1471535 - pt6 - Add GeckoProcessType_RDD. r=jya
authorMichael Froman <mfroman@mozilla.com>
Wed, 14 Nov 2018 18:05:53 +0000
changeset 446219 ee036f60d205108206a42d9c6a9eac1cb31e5a5d
parent 446218 931604fb5982e56e18ee8e0ae15df3dc17c43939
child 446220 52bfaa088f57fd69fde36b54ffc6c1b4017ea1cc
push id35038
push userrmaries@mozilla.com
push dateWed, 14 Nov 2018 22:12:17 +0000
treeherdermozilla-central@4e1b2b7e0c37 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1471535
milestone65.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 1471535 - pt6 - Add GeckoProcessType_RDD. r=jya Depends on D8487 Differential Revision: https://phabricator.services.mozilla.com/D8488
toolkit/xre/nsAppRunner.cpp
xpcom/build/nsXULAppAPI.h
xpcom/system/nsIXULRuntime.idl
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -780,19 +780,20 @@ nsXULAppInfo::GetWidgetToolkit(nsACStrin
 SYNC_ENUMS(DEFAULT, Default)
 SYNC_ENUMS(PLUGIN, Plugin)
 SYNC_ENUMS(CONTENT, Content)
 SYNC_ENUMS(IPDLUNITTEST, IPDLUnitTest)
 SYNC_ENUMS(GMPLUGIN, GMPlugin)
 SYNC_ENUMS(GPU, GPU)
 SYNC_ENUMS(PDFIUM, PDFium)
 SYNC_ENUMS(VR, VR)
+SYNC_ENUMS(RDD, RDD)
 
 // .. and ensure that that is all of them:
-static_assert(GeckoProcessType_VR + 1 == GeckoProcessType_End,
+static_assert(GeckoProcessType_RDD + 1 == GeckoProcessType_End,
               "Did not find the final GeckoProcessType");
 
 NS_IMETHODIMP
 nsXULAppInfo::GetProcessType(uint32_t* aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
   *aResult = XRE_GetProcessType();
   return NS_OK;
@@ -5123,16 +5124,22 @@ XRE_GetProcessType()
 
 bool
 XRE_IsGPUProcess()
 {
   return XRE_GetProcessType() == GeckoProcessType_GPU;
 }
 
 bool
+XRE_IsRDDProcess()
+{
+  return XRE_GetProcessType() == GeckoProcessType_RDD;
+}
+
+bool
 XRE_IsVRProcess()
 {
   return XRE_GetProcessType() == GeckoProcessType_VR;
 }
 
 /**
  * Returns true in the e10s parent process and in the main process when e10s
  * is disabled.
--- a/xpcom/build/nsXULAppAPI.h
+++ b/xpcom/build/nsXULAppAPI.h
@@ -385,29 +385,31 @@ enum GeckoProcessType
 
   GeckoProcessType_IPDLUnitTest,
 
   GeckoProcessType_GMPlugin, // Gecko Media Plugin
 
   GeckoProcessType_GPU,      // GPU and compositor process
   GeckoProcessType_PDFium,   // Gecko PDFium process
   GeckoProcessType_VR,       // VR process
+  GeckoProcessType_RDD,      // RDD (RemoteDataDecoder process)
   GeckoProcessType_End,
   GeckoProcessType_Invalid = GeckoProcessType_End
 };
 
 static const char* const kGeckoProcessTypeString[] = {
   "default",
   "plugin",
   "tab",
   "ipdlunittest",
   "geckomediaplugin",
   "gpu",
   "pdfium",
-  "vr"
+  "vr",
+  "rdd"
 };
 
 static_assert(MOZ_ARRAY_LENGTH(kGeckoProcessTypeString) ==
               GeckoProcessType_End,
               "Array length mismatch");
 
 XRE_API(const char*,
         XRE_ChildProcessTypeToString, (GeckoProcessType aProcessType))
@@ -476,16 +478,19 @@ XRE_API(bool,
 
 XRE_API(bool,
         XRE_IsContentProcess, ())
 
 XRE_API(bool,
         XRE_IsGPUProcess, ())
 
 XRE_API(bool,
+        XRE_IsRDDProcess, ())
+
+XRE_API(bool,
         XRE_IsVRProcess, ())
 
 XRE_API(bool,
         XRE_IsPluginProcess, ())
 
 /**
  * Returns true if the appshell should run its own native event loop. Returns
  * false if we should rely solely on the Gecko event loop.
--- a/xpcom/system/nsIXULRuntime.idl
+++ b/xpcom/system/nsIXULRuntime.idl
@@ -73,16 +73,17 @@ interface nsIXULRuntime : nsISupports
   const unsigned long PROCESS_TYPE_DEFAULT = 0;
   const unsigned long PROCESS_TYPE_PLUGIN = 1;
   const unsigned long PROCESS_TYPE_CONTENT = 2;
   const unsigned long PROCESS_TYPE_IPDLUNITTEST = 3;
   const unsigned long PROCESS_TYPE_GMPLUGIN = 4;
   const unsigned long PROCESS_TYPE_GPU = 5;
   const unsigned long PROCESS_TYPE_PDFIUM = 6;
   const unsigned long PROCESS_TYPE_VR = 7;
+  const unsigned long PROCESS_TYPE_RDD = 8;
 
   /**
    * The type of the caller's process.  Returns one of the values above.
    */
   readonly attribute unsigned long processType;
 
   /**
    * The system process ID of the caller's process.