Bug 1471535 - pt6 - Add GeckoProcessType_RDD. r=jya
☠☠ backed out by 679069f59585 ☠ ☠
authorMichael Froman <mfroman@mozilla.com>
Tue, 13 Nov 2018 17:35:21 +0000
changeset 446070 af91e1f04c2d45b2bec08f273a6a12814096cee6
parent 446069 d39fef4334b3bcb142d90ec50439b5ab521d9712
child 446071 28ae4b6fab688d07caaa083f0c0975f05bcfdd86
push id35034
push userccoroiu@mozilla.com
push dateWed, 14 Nov 2018 09:49:38 +0000
treeherdermozilla-central@d8a262837cd3 [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.