зеркало из 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`.
|
||||
PreallocatedProcessManager::AddBlocker(p);
|
||||
|
||||
nsAutoString remoteType(aRemoteType);
|
||||
return launchPromise->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
// on resolve
|
||||
[p, recordReplayState, remoteType,
|
||||
[p, recordReplayState,
|
||||
launchPromise](const RefPtr<ContentParent>& subProcess) {
|
||||
if (recordReplayState == eNotRecordingOrReplaying) {
|
||||
// We cannot reuse `contentParents` as it may have been
|
||||
// overwritten or otherwise altered by another process launch.
|
||||
nsTArray<ContentParent*>& contentParents =
|
||||
GetOrCreatePool(remoteType);
|
||||
GetOrCreatePool(p->GetRemoteType());
|
||||
contentParents.AppendElement(p);
|
||||
}
|
||||
|
||||
|
|
|
@ -363,7 +363,7 @@ void RemoteWorkerManager::LaunchNewContentProcess(
|
|||
/* aFrameElement = */ nullptr,
|
||||
/* aRemoteType = */ NS_LITERAL_STRING(DEFAULT_REMOTE_TYPE))
|
||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[isServiceWorker, &principalInfo](
|
||||
[isServiceWorker, principalInfo](
|
||||
const ContentParent::LaunchPromise::ResolveOrRejectValue&
|
||||
aResult) {
|
||||
if (!isServiceWorker) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче