Backed out 2 changesets (bug 1575092) for causing Bug 1596556 and Bug 1596556.
authorGurzau Raul <rgurzau@mozilla.com>
Sun, 17 Nov 2019 13:58:56 +0200
changeset 502342 0f821db6009844d9234c28c02de86000bf5003de
parent 502341 e6e016592c81510432cdaf2d159f363dd4b9eb45
child 502343 16aae9e3e3ea4e6770189908388ded4cb6836de3
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1575092, 1596556
milestone72.0a1
backs out8dc03b744500555e87b7506bd317a6c70438603c
e28e46ca4a17fc887d2f206b13bca33d205112d7
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
Backed out 2 changesets (bug 1575092) for causing Bug 1596556 and Bug 1596556. Backed out changeset 8dc03b744500 (bug 1575092) Backed out changeset e28e46ca4a17 (bug 1575092)
dom/ipc/ContentChild.cpp
dom/ipc/ContentParent.cpp
dom/ipc/ContentParent.h
dom/workers/remoteworkers/RemoteWorkerManager.cpp
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -1345,27 +1345,17 @@ void ContentChild::InitXPCOM(
     MOZ_ASSERT_UNREACHABLE("PBackground init can't fail at this point");
     return;
   }
 
   LSObject::Initialize();
 
   ClientManager::Startup();
 
-  // Respecting COOP and COEP requires processing headers in the parent process
-  // in order to choose an appropriate content process, but the workers'
-  // ScriptLoader processes headers in content processes. An intermediary step
-  // that provides security guarantees is to simply never allow SharedWorkers
-  // and ServiceWorkers to exist in a COOP+COEP process. The ultimate goal
-  // is to allow these worker types to be put in such processes based on their
-  // script response headers.
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1595206
-  if (!IsWebCoopCoepRemoteType(GetRemoteType())) {
-    RemoteWorkerService::Initialize();
-  }
+  RemoteWorkerService::Initialize();
 
   nsCOMPtr<nsIConsoleService> svc(do_GetService(NS_CONSOLESERVICE_CONTRACTID));
   if (!svc) {
     NS_WARNING("Couldn't acquire console service");
     return;
   }
 
   mConsoleListener = new ConsoleListener(this);
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -723,21 +723,16 @@ 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,18 +1393,16 @@ 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
--- a/dom/workers/remoteworkers/RemoteWorkerManager.cpp
+++ b/dom/workers/remoteworkers/RemoteWorkerManager.cpp
@@ -234,22 +234,17 @@ RemoteWorkerManager::SelectTargetActorFo
     MOZ_ASSERT(bgParent);
 
     RefPtr<ContentParent> contentParent =
         BackgroundParent::GetContentParent(bgParent);
 
     auto scopeExit = MakeScopeExit(
         [&] { contentParents.AppendElement(std::move(contentParent)); });
 
-    const nsAString& remoteType = contentParent->GetRemoteType();
-    MOZ_DIAGNOSTIC_ASSERT(
-        !IsWebCoopCoepRemoteType(remoteType),
-        "COOP+COEP processes don't support remote workers right now");
-
-    if (IsWebRemoteType(remoteType)) {
+    if (IsWebRemoteType(contentParent->GetRemoteType())) {
       auto lock = contentParent->mRemoteWorkerActorData.Lock();
 
       if (lock->mCount || !lock->mShutdownStarted) {
         ++lock->mCount;
 
         // This won't cause any race conditions because the content process
         // should wait for the permissions to be received before executing the
         // Service Worker.