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)
This commit is contained in:
Gurzau Raul 2019-11-17 13:58:56 +02:00
Родитель e317a07882
Коммит a6a14f9410
4 изменённых файлов: 2 добавлений и 24 удалений

Просмотреть файл

@ -1350,17 +1350,7 @@ void ContentChild::InitXPCOM(
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) {

Просмотреть файл

@ -728,11 +728,6 @@ bool IsWebRemoteType(const nsAString& 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) {

Просмотреть файл

@ -1398,8 +1398,6 @@ const nsDependentSubstring RemoteTypePrefix(
// This is based on isWebRemoteType in E10SUtils.jsm.
bool IsWebRemoteType(const nsAString& aContentProcessType);
bool IsWebCoopCoepRemoteType(const nsAString& aContentProcessType);
} // namespace dom
} // namespace mozilla

Просмотреть файл

@ -239,12 +239,7 @@ RemoteWorkerManager::SelectTargetActorForServiceWorker(
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) {