зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1609110 - Follow up fixes on async process creation. r=Yoric,asuth
Differential Revision: https://phabricator.services.mozilla.com/D59854 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c28a24abaf
Коммит
1dd72eeb1a
|
@ -976,17 +976,16 @@ ContentParent::GetNewOrUsedBrowserProcessAsync(Element* aFrameElement,
|
||||||
// cleanup manually in the `OnReject`.
|
// cleanup manually in the `OnReject`.
|
||||||
PreallocatedProcessManager::AddBlocker(p);
|
PreallocatedProcessManager::AddBlocker(p);
|
||||||
|
|
||||||
nsAutoString remoteType(aRemoteType);
|
|
||||||
return launchPromise->Then(
|
return launchPromise->Then(
|
||||||
GetCurrentThreadSerialEventTarget(), __func__,
|
GetCurrentThreadSerialEventTarget(), __func__,
|
||||||
// on resolve
|
// on resolve
|
||||||
[p, recordReplayState, remoteType,
|
[p, recordReplayState,
|
||||||
launchPromise](const RefPtr<ContentParent>& subProcess) {
|
launchPromise](const RefPtr<ContentParent>& subProcess) {
|
||||||
if (recordReplayState == eNotRecordingOrReplaying) {
|
if (recordReplayState == eNotRecordingOrReplaying) {
|
||||||
// We cannot reuse `contentParents` as it may have been
|
// We cannot reuse `contentParents` as it may have been
|
||||||
// overwritten or otherwise altered by another process launch.
|
// overwritten or otherwise altered by another process launch.
|
||||||
nsTArray<ContentParent*>& contentParents =
|
nsTArray<ContentParent*>& contentParents =
|
||||||
GetOrCreatePool(remoteType);
|
GetOrCreatePool(p->GetRemoteType());
|
||||||
contentParents.AppendElement(p);
|
contentParents.AppendElement(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -363,7 +363,7 @@ void RemoteWorkerManager::LaunchNewContentProcess(
|
||||||
/* aFrameElement = */ nullptr,
|
/* aFrameElement = */ nullptr,
|
||||||
/* aRemoteType = */ NS_LITERAL_STRING(DEFAULT_REMOTE_TYPE))
|
/* aRemoteType = */ NS_LITERAL_STRING(DEFAULT_REMOTE_TYPE))
|
||||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||||
[isServiceWorker, &principalInfo](
|
[isServiceWorker, principalInfo](
|
||||||
const ContentParent::LaunchPromise::ResolveOrRejectValue&
|
const ContentParent::LaunchPromise::ResolveOrRejectValue&
|
||||||
aResult) {
|
aResult) {
|
||||||
if (!isServiceWorker) {
|
if (!isServiceWorker) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче