From 160c12d050121eac86d824ce35c823ff94c35502 Mon Sep 17 00:00:00 2001 From: Butkovits Atila Date: Wed, 18 May 2022 01:40:17 +0300 Subject: [PATCH] Backed out changeset 7b69c225f7c7 (bug 1769624) because the patch is not ready yet. CLOSED TREE --- ipc/glue/UtilityProcessManager.cpp | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/ipc/glue/UtilityProcessManager.cpp b/ipc/glue/UtilityProcessManager.cpp index d4d671a685f8..a972b5f17e83 100644 --- a/ipc/glue/UtilityProcessManager.cpp +++ b/ipc/glue/UtilityProcessManager.cpp @@ -126,7 +126,6 @@ RefPtr UtilityProcessManager::LaunchProcess( MOZ_ASSERT(NS_IsMainThread()); if (IsShutdown()) { - NS_WARNING("Reject early LaunchProcess() for Shutdown"); return GenericNonExclusivePromise::CreateAndReject(NS_ERROR_NOT_AVAILABLE, __func__); } @@ -134,7 +133,6 @@ RefPtr UtilityProcessManager::LaunchProcess( RefPtr p = GetProcess(aSandbox); if (p && p->mNumProcessAttempts) { // We failed to start the Utility process earlier, abort now. - NS_WARNING("Reject LaunchProcess() for earlier mNumProcessAttempts"); return GenericNonExclusivePromise::CreateAndReject(NS_ERROR_NOT_AVAILABLE, __func__); } @@ -158,7 +156,6 @@ RefPtr UtilityProcessManager::LaunchProcess( if (!p->mProcess->Launch(extraArgs)) { p->mNumProcessAttempts++; DestroyProcess(aSandbox); - NS_WARNING("Reject LaunchProcess() for mNumProcessAttempts++"); return GenericNonExclusivePromise::CreateAndReject(NS_ERROR_NOT_AVAILABLE, __func__); } @@ -168,13 +165,11 @@ RefPtr UtilityProcessManager::LaunchProcess( GetMainThreadSerialEventTarget(), __func__, [self, p, aSandbox](bool) { if (self->IsShutdown()) { - NS_WARNING("Reject LaunchProcess() after LaunchPromise() for Shutdown"); return GenericNonExclusivePromise::CreateAndReject( NS_ERROR_NOT_AVAILABLE, __func__); } if (self->IsProcessDestroyed(aSandbox)) { - NS_WARNING("Reject LaunchProcess() after LaunchPromise() for destroyed process"); return GenericNonExclusivePromise::CreateAndReject( NS_ERROR_NOT_AVAILABLE, __func__); } @@ -199,7 +194,6 @@ RefPtr UtilityProcessManager::LaunchProcess( p->mNumProcessAttempts++; self->DestroyProcess(aSandbox); } - NS_WARNING("Reject LaunchProcess() for LaunchPromise() rejection"); return GenericNonExclusivePromise::CreateAndReject(aError, __func__); }); @@ -250,11 +244,8 @@ RefPtr UtilityProcessManager::StartUtility( return GenericNonExclusivePromise::CreateAndResolve(true, __func__); }, - [self](nsresult aError) { - if (!self->IsShutdown()) { - MOZ_ASSERT_UNREACHABLE("Failure when starting actor"); - } - NS_WARNING("Reject StartUtility() for LaunchProcess() rejection"); + [](nsresult aError) { + MOZ_ASSERT_UNREACHABLE("Failure when starting actor"); return GenericNonExclusivePromise::CreateAndReject(aError, __func__); }); } @@ -298,12 +289,9 @@ UtilityProcessManager::StartAudioDecoding(base::ProcessId aOtherProcess) { return AudioDecodingPromise::CreateAndResolve(std::move(childPipe), __func__); }, - [self](nsresult aError) { - if (!self->IsShutdown()) { - MOZ_ASSERT_UNREACHABLE( - "PUtilityAudioDecoder: failure when starting actor"); - } - NS_WARNING("Reject StartAudioDecoding() for StartUtility() rejection"); + [](nsresult aError) { + MOZ_ASSERT_UNREACHABLE( + "PUtilityAudioDecoder: failure when starting actor"); return AudioDecodingPromise::CreateAndReject(aError, __func__); }); }