Bug 1575092 - add "web COOP+COEP" process type helpers r=asuth
authorPerry Jiang <perry@mozilla.com>
Wed, 20 Nov 2019 19:45:14 +0000
changeset 503084 036e6a66c52588f24e76ed4041fc56fa3799ef2b
parent 503083 adc08e84bf7657ee0f00359f164681a8d3b5e93d
child 503085 da39e98af6a27ebaed99292f7bd50ea90b1cea84
push id36828
push userccoroiu@mozilla.com
push dateThu, 21 Nov 2019 21:44:22 +0000
treeherdermozilla-central@76e20a306bc2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth
bugs1575092
milestone72.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 1575092 - add "web COOP+COEP" process type helpers r=asuth Differential Revision: https://phabricator.services.mozilla.com/D50814
dom/ipc/ContentParent.cpp
dom/ipc/ContentParent.h
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -723,16 +723,21 @@ const nsDependentSubstring RemoteTypePre
   return StringHead(aContentProcessType, equalIdx);
 }
 
 bool IsWebRemoteType(const nsAString& aContentProcessType) {
   return StringBeginsWith(aContentProcessType,
                           NS_LITERAL_STRING(DEFAULT_REMOTE_TYPE));
 }
 
+bool IsWebCoopCoepRemoteType(const nsAString& aContentProcessType) {
+  return StringBeginsWith(aContentProcessType,
+                          NS_LITERAL_STRING(WITH_COOP_COEP_REMOTE_TYPE_PREFIX));
+}
+
 /*static*/
 uint32_t ContentParent::GetMaxProcessCount(
     const nsAString& aContentProcessType) {
   // Max process count is based only on the prefix.
   const nsDependentSubstring processTypePrefix =
       RemoteTypePrefix(aContentProcessType);
 
   // Check for the default remote type of "web", as it uses different prefs.
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -1393,16 +1393,18 @@ NS_DEFINE_STATIC_IID_ACCESSOR(ContentPar
 
 // This is the C++ version of remoteTypePrefix in E10SUtils.jsm.
 const nsDependentSubstring RemoteTypePrefix(
     const nsAString& aContentProcessType);
 
 // This is based on isWebRemoteType in E10SUtils.jsm.
 bool IsWebRemoteType(const nsAString& aContentProcessType);
 
+bool IsWebCoopCoepRemoteType(const nsAString& aContentProcessType);
+
 }  // namespace dom
 }  // namespace mozilla
 
 class ParentIdleListener : public nsIObserver {
   friend class mozilla::dom::ContentParent;
 
  public:
   NS_DECL_ISUPPORTS