зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
e317a07882
Коммит
a6a14f9410
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче