From ab761be29cfd28b926fd5ff19bba82deba2a80f1 Mon Sep 17 00:00:00 2001 From: Alexandre Lissy Date: Thu, 27 Apr 2023 18:46:15 +0000 Subject: [PATCH] Bug 1826875 - Dispatch using correct thread on UtilityProcessManager missing r=ipc-reviewers,nika Differential Revision: https://phabricator.services.mozilla.com/D176618 --- ipc/glue/BackgroundParentImpl.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ipc/glue/BackgroundParentImpl.cpp b/ipc/glue/BackgroundParentImpl.cpp index 62f84f6a1fec..0ff8f54ce226 100644 --- a/ipc/glue/BackgroundParentImpl.cpp +++ b/ipc/glue/BackgroundParentImpl.cpp @@ -1389,8 +1389,13 @@ BackgroundParentImpl::RecvEnsureUtilityProcessAndCreateBridge( std::tuple&&>; if (!upm) { - aResolver(Type(NS_ERROR_NOT_AVAILABLE, - Endpoint())); + managerThread->Dispatch(NS_NewRunnableFunction( + "BackgroundParentImpl::RecvEnsureUtilityProcessAndCreateBridge::" + "Failure", + [aResolver]() { + aResolver(Type(NS_ERROR_NOT_AVAILABLE, + Endpoint())); + })); } else { SandboxingKind sbKind = GetSandboxingKindFromLocation(aLocation); upm->StartProcessForRemoteMediaDecoding(otherPid, sbKind) -- 2.11.4.GIT