diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index e01b2bdd1aa6..6795a9450c8f 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -643,9 +643,8 @@ class nsGtkNativeInitRunnable : public Runnable { } }; -bool ContentChild::Init(MessageLoop* aIOLoop, base::ProcessId aParentPid, - const char* aParentBuildID, - UniquePtr aChannel, uint64_t aChildID, +bool ContentChild::Init(base::ProcessId aParentPid, const char* aParentBuildID, + mozilla::ipc::ScopedPort aPort, uint64_t aChildID, bool aIsForBrowser) { #ifdef MOZ_WIDGET_GTK // When running X11 only build we need to pass a display down @@ -699,7 +698,7 @@ bool ContentChild::Init(MessageLoop* aIOLoop, base::ProcessId aParentPid, return false; } - if (!Open(std::move(aChannel), aParentPid, aIOLoop)) { + if (!Open(std::move(aPort), aParentPid)) { return false; } sSingleton = this; diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h index f214a0ee2e8b..42abd0f5490b 100644 --- a/dom/ipc/ContentChild.h +++ b/dom/ipc/ContentChild.h @@ -119,9 +119,9 @@ class ContentChild final : public PContentChild, nsDocShellLoadState* aLoadState, bool* aWindowIsNew, BrowsingContext** aReturn); - bool Init(MessageLoop* aIOLoop, base::ProcessId aParentPid, - const char* aParentBuildID, UniquePtr aChannel, - uint64_t aChildID, bool aIsForBrowser); + bool Init(base::ProcessId aParentPid, const char* aParentBuildID, + mozilla::ipc::ScopedPort aPort, uint64_t aChildID, + bool aIsForBrowser); void InitXPCOM(XPCOMInitData&& aXPCOMInit, const mozilla::dom::ipc::StructuredCloneData& aInitialData); diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 369d00a0fc46..37839936be6e 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -2570,16 +2570,14 @@ bool ContentParent::LaunchSubprocessResolve(bool aIsSync, ProcessPriority aPriority) { AUTO_PROFILER_LABEL("ContentParent::LaunchSubprocess::resolve", OTHER); - // Take the pending IPC channel. This channel will be used to open the raw IPC - // connection between this process and the launched content process. - UniquePtr channel = mSubprocess->TakeChannel(); - if (!channel) { - // We don't have a channel, so this method must've been called already. + if (mLaunchResolved) { + // We've already been called, return. MOZ_ASSERT(sCreatedFirstContentProcess); MOZ_ASSERT(!mPrefSerializer); MOZ_ASSERT(mLifecycleState != LifecycleState::LAUNCHING); return true; } + mLaunchResolved = true; // Now that communication with the child is complete, we can cleanup // the preference serializer. @@ -2604,7 +2602,7 @@ bool ContentParent::LaunchSubprocessResolve(bool aIsSync, base::ProcessId procId = base::GetProcId(mSubprocess->GetChildProcessHandle()); - Open(std::move(channel), procId); + Open(mSubprocess->TakeInitialPort(), procId); ContentProcessManager::GetSingleton()->AddContentProcess(this); @@ -2732,6 +2730,7 @@ ContentParent::ContentParent(const nsACString& aRemoteType, int32_t aJSPluginID) mCalledKillHard(false), mCreatedPairedMinidumps(false), mShutdownPending(false), + mLaunchResolved(false), mIsRemoteInputEventQueueEnabled(false), mIsInputPriorityEventEnabled(false), mIsInPool(false), diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index ca3b3251a32f..b5065c21499e 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -1543,6 +1543,7 @@ class ContentParent final uint8_t mCalledKillHard : 1; uint8_t mCreatedPairedMinidumps : 1; uint8_t mShutdownPending : 1; + uint8_t mLaunchResolved : 1; // True if the input event queue on the main thread of the content process is // enabled. diff --git a/dom/ipc/ContentProcess.cpp b/dom/ipc/ContentProcess.cpp index 907f73b7e6da..d167b0a815d6 100644 --- a/dom/ipc/ContentProcess.cpp +++ b/dom/ipc/ContentProcess.cpp @@ -196,8 +196,8 @@ bool ContentProcess::Init(int aArgc, char* aArgv[]) { return false; } - mContent.Init(IOThreadChild::message_loop(), ParentPid(), *parentBuildID, - IOThreadChild::TakeChannel(), *childID, *isForBrowser); + mContent.Init(ParentPid(), *parentBuildID, IOThreadChild::TakeInitialPort(), + *childID, *isForBrowser); mXREEmbed.Start(); #if (defined(XP_MACOSX)) && defined(MOZ_SANDBOX) diff --git a/dom/media/gmp/GMPChild.cpp b/dom/media/gmp/GMPChild.cpp index 7d48242f9025..f3f1bb8054c4 100644 --- a/dom/media/gmp/GMPChild.cpp +++ b/dom/media/gmp/GMPChild.cpp @@ -155,11 +155,11 @@ static bool GetPluginPaths(const nsAString& aPluginPath, #endif // XP_MACOSX bool GMPChild::Init(const nsAString& aPluginPath, base::ProcessId aParentPid, - MessageLoop* aIOLoop, UniquePtr aChannel) { + mozilla::ipc::ScopedPort aPort) { GMP_CHILD_LOG_DEBUG("%s pluginPath=%s", __FUNCTION__, NS_ConvertUTF16toUTF8(aPluginPath).get()); - if (NS_WARN_IF(!Open(std::move(aChannel), aParentPid, aIOLoop))) { + if (NS_WARN_IF(!Open(std::move(aPort), aParentPid))) { return false; } diff --git a/dom/media/gmp/GMPChild.h b/dom/media/gmp/GMPChild.h index 3c530d771a47..ddb774e0947b 100644 --- a/dom/media/gmp/GMPChild.h +++ b/dom/media/gmp/GMPChild.h @@ -26,7 +26,7 @@ class GMPChild : public PGMPChild { virtual ~GMPChild(); bool Init(const nsAString& aPluginPath, base::ProcessId aParentPid, - MessageLoop* aIOLoop, UniquePtr aChannel); + mozilla::ipc::ScopedPort aPort); MessageLoop* GMPMessageLoop(); // Main thread only. diff --git a/dom/media/gmp/GMPParent.cpp b/dom/media/gmp/GMPParent.cpp index c50a2602866f..237937f9c9c2 100644 --- a/dom/media/gmp/GMPParent.cpp +++ b/dom/media/gmp/GMPParent.cpp @@ -280,7 +280,7 @@ nsresult GMPParent::LoadProcess() { mChildPid = base::GetProcId(mProcess->GetChildProcessHandle()); GMP_PARENT_LOG_DEBUG("%s: Launched new child process", __FUNCTION__); - bool opened = Open(mProcess->TakeChannel(), + bool opened = Open(mProcess->TakeInitialPort(), base::GetProcId(mProcess->GetChildProcessHandle())); if (!opened) { GMP_PARENT_LOG_DEBUG("%s: Failed to open channel to new child process", diff --git a/dom/media/gmp/GMPProcessChild.cpp b/dom/media/gmp/GMPProcessChild.cpp index cb2d1dadc442..3abfbd9ed612 100644 --- a/dom/media/gmp/GMPProcessChild.cpp +++ b/dom/media/gmp/GMPProcessChild.cpp @@ -41,8 +41,7 @@ bool GMPProcessChild::Init(int aArgc, char* aArgv[]) { BackgroundHangMonitor::Startup(); return mPlugin.Init(pluginFilename, ParentPid(), - IOThreadChild::message_loop(), - IOThreadChild::TakeChannel()); + IOThreadChild::TakeInitialPort()); } void GMPProcessChild::CleanUp() { BackgroundHangMonitor::Shutdown(); } diff --git a/dom/media/ipc/RDDParent.cpp b/dom/media/ipc/RDDParent.cpp index 4a4076874ad8..5be2f4024168 100644 --- a/dom/media/ipc/RDDParent.cpp +++ b/dom/media/ipc/RDDParent.cpp @@ -68,7 +68,7 @@ RDDParent* RDDParent::GetSingleton() { } bool RDDParent::Init(base::ProcessId aParentPid, const char* aParentBuildID, - MessageLoop* aIOLoop, UniquePtr aChannel) { + mozilla::ipc::ScopedPort aPort) { // Initialize the thread manager before starting IPC. Otherwise, messages // may be posted to the main thread and we won't be able to process them. if (NS_WARN_IF(NS_FAILED(nsThreadManager::get().Init()))) { @@ -76,7 +76,7 @@ bool RDDParent::Init(base::ProcessId aParentPid, const char* aParentBuildID, } // Now it's safe to start IPC. - if (NS_WARN_IF(!Open(std::move(aChannel), aParentPid, aIOLoop))) { + if (NS_WARN_IF(!Open(std::move(aPort), aParentPid))) { return false; } diff --git a/dom/media/ipc/RDDParent.h b/dom/media/ipc/RDDParent.h index 8f0e5ea73774..975e5c6a7d82 100644 --- a/dom/media/ipc/RDDParent.h +++ b/dom/media/ipc/RDDParent.h @@ -25,7 +25,7 @@ class RDDParent final : public PRDDParent { AsyncBlockers& AsyncShutdownService() { return mShutdownBlockers; } bool Init(base::ProcessId aParentPid, const char* aParentBuildID, - MessageLoop* aIOLoop, UniquePtr aChannel); + mozilla::ipc::ScopedPort aPort); mozilla::ipc::IPCResult RecvInit(nsTArray&& vars, const Maybe& aBrokerFd, diff --git a/dom/media/ipc/RDDProcessHost.cpp b/dom/media/ipc/RDDProcessHost.cpp index 73c51526d757..c2a5b1da7995 100644 --- a/dom/media/ipc/RDDProcessHost.cpp +++ b/dom/media/ipc/RDDProcessHost.cpp @@ -167,8 +167,8 @@ void RDDProcessHost::InitAfterConnect(bool aSucceeded) { } mProcessToken = ++sRDDProcessTokenCounter; mRDDChild = MakeUnique(this); - DebugOnly rv = - mRDDChild->Open(TakeChannel(), base::GetProcId(GetChildProcessHandle())); + DebugOnly rv = mRDDChild->Open( + TakeInitialPort(), base::GetProcId(GetChildProcessHandle())); MOZ_ASSERT(rv); // Only clear mPrefSerializer in the success case to avoid a diff --git a/dom/media/ipc/RDDProcessImpl.cpp b/dom/media/ipc/RDDProcessImpl.cpp index 08233e3b11e0..c077a382a484 100644 --- a/dom/media/ipc/RDDProcessImpl.cpp +++ b/dom/media/ipc/RDDProcessImpl.cpp @@ -80,8 +80,8 @@ bool RDDProcessImpl::Init(int aArgc, char* aArgv[]) { return false; } - return mRDD.Init(ParentPid(), parentBuildID, IOThreadChild::message_loop(), - IOThreadChild::TakeChannel()); + return mRDD.Init(ParentPid(), parentBuildID, + IOThreadChild::TakeInitialPort()); } void RDDProcessImpl::CleanUp() { NS_ShutdownXPCOM(nullptr); } diff --git a/gfx/ipc/GPUParent.cpp b/gfx/ipc/GPUParent.cpp index cff8730eb382..f0550e00b928 100644 --- a/gfx/ipc/GPUParent.cpp +++ b/gfx/ipc/GPUParent.cpp @@ -140,7 +140,7 @@ GPUParent* GPUParent::GetSingleton() { } bool GPUParent::Init(base::ProcessId aParentPid, const char* aParentBuildID, - MessageLoop* aIOLoop, UniquePtr aChannel) { + mozilla::ipc::ScopedPort aPort) { // Initialize the thread manager before starting IPC. Otherwise, messages // may be posted to the main thread and we won't be able to process them. if (NS_WARN_IF(NS_FAILED(nsThreadManager::get().Init()))) { @@ -148,7 +148,7 @@ bool GPUParent::Init(base::ProcessId aParentPid, const char* aParentBuildID, } // Now it's safe to start IPC. - if (NS_WARN_IF(!Open(std::move(aChannel), aParentPid, aIOLoop))) { + if (NS_WARN_IF(!Open(std::move(aPort), aParentPid))) { return false; } diff --git a/gfx/ipc/GPUParent.h b/gfx/ipc/GPUParent.h index 27daf79af318..b5cf376bcd23 100644 --- a/gfx/ipc/GPUParent.h +++ b/gfx/ipc/GPUParent.h @@ -37,7 +37,7 @@ class GPUParent final : public PGPUParent { static bool MaybeFlushMemory(); bool Init(base::ProcessId aParentPid, const char* aParentBuildID, - MessageLoop* aIOLoop, UniquePtr aChannel); + mozilla::ipc::ScopedPort aPort); void NotifyDeviceReset(); already_AddRefed AllocPAPZInputBridgeParent( diff --git a/gfx/ipc/GPUProcessHost.cpp b/gfx/ipc/GPUProcessHost.cpp index 206cb6c84825..684a4f9cf041 100644 --- a/gfx/ipc/GPUProcessHost.cpp +++ b/gfx/ipc/GPUProcessHost.cpp @@ -139,7 +139,7 @@ void GPUProcessHost::InitAfterConnect(bool aSucceeded) { mProcessToken = ++sProcessTokenCounter; mGPUChild = MakeUnique(this); DebugOnly rv = mGPUChild->Open( - TakeChannel(), base::GetProcId(GetChildProcessHandle())); + TakeInitialPort(), base::GetProcId(GetChildProcessHandle())); MOZ_ASSERT(rv); mGPUChild->Init(); diff --git a/gfx/ipc/GPUProcessImpl.cpp b/gfx/ipc/GPUProcessImpl.cpp index 8c9fc37c665e..296f6a4a77a0 100644 --- a/gfx/ipc/GPUProcessImpl.cpp +++ b/gfx/ipc/GPUProcessImpl.cpp @@ -73,8 +73,8 @@ bool GPUProcessImpl::Init(int aArgc, char* aArgv[]) { return false; } - return mGPU.Init(ParentPid(), parentBuildID, IOThreadChild::message_loop(), - IOThreadChild::TakeChannel()); + return mGPU.Init(ParentPid(), parentBuildID, + IOThreadChild::TakeInitialPort()); } void GPUProcessImpl::CleanUp() { NS_ShutdownXPCOM(nullptr); } diff --git a/gfx/vr/ipc/VRParent.cpp b/gfx/vr/ipc/VRParent.cpp index 3a5a5d9b49ab..6a78a5700b68 100644 --- a/gfx/vr/ipc/VRParent.cpp +++ b/gfx/vr/ipc/VRParent.cpp @@ -132,7 +132,7 @@ void VRParent::ActorDestroy(ActorDestroyReason aWhy) { } bool VRParent::Init(base::ProcessId aParentPid, const char* aParentBuildID, - MessageLoop* aIOLoop, UniquePtr aChannel) { + mozilla::ipc::ScopedPort aPort) { // Initialize the thread manager before starting IPC. Otherwise, messages // may be posted to the main thread and we won't be able to process them. if (NS_WARN_IF(NS_FAILED(nsThreadManager::get().Init()))) { @@ -140,7 +140,7 @@ bool VRParent::Init(base::ProcessId aParentPid, const char* aParentBuildID, } // Now it's safe to start IPC. - if (NS_WARN_IF(!Open(std::move(aChannel), aParentPid, aIOLoop))) { + if (NS_WARN_IF(!Open(std::move(aPort), aParentPid))) { return false; } diff --git a/gfx/vr/ipc/VRParent.h b/gfx/vr/ipc/VRParent.h index 36c0743ba5c2..d5de99cac5ce 100644 --- a/gfx/vr/ipc/VRParent.h +++ b/gfx/vr/ipc/VRParent.h @@ -25,7 +25,7 @@ class VRParent final : public PVRParent { explicit VRParent(); bool Init(base::ProcessId aParentPid, const char* aParentBuildID, - MessageLoop* aIOLoop, UniquePtr aChannel); + mozilla::ipc::ScopedPort aPort); virtual void ActorDestroy(ActorDestroyReason aWhy) override; bool GetOpenVRControllerActionPath(nsCString* aPath); bool GetOpenVRControllerManifestPath(VRControllerType aType, diff --git a/gfx/vr/ipc/VRProcessChild.cpp b/gfx/vr/ipc/VRProcessChild.cpp index 700a5519652e..4da047f7afea 100644 --- a/gfx/vr/ipc/VRProcessChild.cpp +++ b/gfx/vr/ipc/VRProcessChild.cpp @@ -72,8 +72,7 @@ bool VRProcessChild::Init(int aArgc, char* aArgv[]) { } sVRParent = new VRParent(); - sVRParent->Init(ParentPid(), parentBuildID, IOThreadChild::message_loop(), - IOThreadChild::TakeChannel()); + sVRParent->Init(ParentPid(), parentBuildID, IOThreadChild::TakeInitialPort()); return true; } diff --git a/gfx/vr/ipc/VRProcessParent.cpp b/gfx/vr/ipc/VRProcessParent.cpp index 8bae87631918..377e2bea99a2 100644 --- a/gfx/vr/ipc/VRProcessParent.cpp +++ b/gfx/vr/ipc/VRProcessParent.cpp @@ -157,8 +157,8 @@ bool VRProcessParent::InitAfterConnect(bool aSucceeded) { mVRChild = MakeUnique(this); - DebugOnly rv = - mVRChild->Open(TakeChannel(), base::GetProcId(GetChildProcessHandle())); + DebugOnly rv = mVRChild->Open( + TakeInitialPort(), base::GetProcId(GetChildProcessHandle())); MOZ_ASSERT(rv); mVRChild->Init(); diff --git a/ipc/ipdl/test/cxx/IPDLUnitTestProcessChild.cpp b/ipc/ipdl/test/cxx/IPDLUnitTestProcessChild.cpp index d2a1f9872ae4..7683808535dd 100644 --- a/ipc/ipdl/test/cxx/IPDLUnitTestProcessChild.cpp +++ b/ipc/ipdl/test/cxx/IPDLUnitTestProcessChild.cpp @@ -16,6 +16,7 @@ namespace mozilla { namespace _ipdltest { bool IPDLUnitTestProcessChild::Init(int aArgc, char* aArgv[]) { + // FIXME(nika): this is quite clearly broken and needs to be fixed. IPDLUnitTestChildInit(IOThreadChild::TakeChannel(), ParentPid(), IOThreadChild::message_loop()); diff --git a/netwerk/ipc/SocketProcessChild.cpp b/netwerk/ipc/SocketProcessChild.cpp index 3e9297632a7e..b4a3d71e5e8d 100644 --- a/netwerk/ipc/SocketProcessChild.cpp +++ b/netwerk/ipc/SocketProcessChild.cpp @@ -98,12 +98,12 @@ void CGSShutdownServerConnections(); #endif bool SocketProcessChild::Init(base::ProcessId aParentPid, - const char* aParentBuildID, MessageLoop* aIOLoop, - UniquePtr aChannel) { + const char* aParentBuildID, + mozilla::ipc::ScopedPort aPort) { if (NS_WARN_IF(NS_FAILED(nsThreadManager::get().Init()))) { return false; } - if (NS_WARN_IF(!Open(std::move(aChannel), aParentPid, aIOLoop))) { + if (NS_WARN_IF(!Open(std::move(aPort), aParentPid))) { return false; } // This must be sent before any IPDL message, which may hit sentinel diff --git a/netwerk/ipc/SocketProcessChild.h b/netwerk/ipc/SocketProcessChild.h index fc5004ce86fc..e5c1e4f23eab 100644 --- a/netwerk/ipc/SocketProcessChild.h +++ b/netwerk/ipc/SocketProcessChild.h @@ -35,7 +35,7 @@ class SocketProcessChild final static SocketProcessChild* GetSingleton(); bool Init(base::ProcessId aParentPid, const char* aParentBuildID, - MessageLoop* aIOLoop, UniquePtr aChannel); + mozilla::ipc::ScopedPort aPort); void ActorDestroy(ActorDestroyReason aWhy) override; diff --git a/netwerk/ipc/SocketProcessHost.cpp b/netwerk/ipc/SocketProcessHost.cpp index 6dc5977c2a54..f35d369a17cb 100644 --- a/netwerk/ipc/SocketProcessHost.cpp +++ b/netwerk/ipc/SocketProcessHost.cpp @@ -143,7 +143,7 @@ void SocketProcessHost::InitAfterConnect(bool aSucceeded) { mSocketProcessParent = MakeUnique(this); DebugOnly rv = mSocketProcessParent->Open( - TakeChannel(), base::GetProcId(GetChildProcessHandle())); + TakeInitialPort(), base::GetProcId(GetChildProcessHandle())); MOZ_ASSERT(rv); SocketPorcessInitAttributes attributes; diff --git a/netwerk/ipc/SocketProcessImpl.cpp b/netwerk/ipc/SocketProcessImpl.cpp index ad539c67dcfb..a442ead33650 100644 --- a/netwerk/ipc/SocketProcessImpl.cpp +++ b/netwerk/ipc/SocketProcessImpl.cpp @@ -105,8 +105,7 @@ bool SocketProcessImpl::Init(int aArgc, char* aArgv[]) { } return mSocketProcessChild.Init(ParentPid(), parentBuildID, - IOThreadChild::message_loop(), - IOThreadChild::TakeChannel()); + IOThreadChild::TakeInitialPort()); } void SocketProcessImpl::CleanUp() { mSocketProcessChild.CleanUp(); } diff --git a/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerChild.cpp b/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerChild.cpp index f14b0b2fb400..367590685cd9 100644 --- a/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerChild.cpp +++ b/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerChild.cpp @@ -22,9 +22,8 @@ RemoteSandboxBrokerChild::RemoteSandboxBrokerChild() { RemoteSandboxBrokerChild::~RemoteSandboxBrokerChild() {} bool RemoteSandboxBrokerChild::Init(base::ProcessId aParentPid, - MessageLoop* aIOLoop, - UniquePtr aChannel) { - if (NS_WARN_IF(!Open(std::move(aChannel), aParentPid, aIOLoop))) { + mozilla::ipc::ScopedPort aPort) { + if (NS_WARN_IF(!Open(std::move(aPort), aParentPid))) { return false; } CrashReporterClient::InitSingleton(this); diff --git a/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerChild.h b/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerChild.h index cf42ba37ca1e..5d82d065d55f 100644 --- a/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerChild.h +++ b/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerChild.h @@ -18,8 +18,7 @@ class RemoteSandboxBrokerChild : public PRemoteSandboxBrokerChild { public: RemoteSandboxBrokerChild(); virtual ~RemoteSandboxBrokerChild(); - bool Init(base::ProcessId aParentPid, MessageLoop* aIOLoop, - UniquePtr aChannel); + bool Init(base::ProcessId aParentPid, mozilla::ipc::ScopedPort aPort); private: mozilla::ipc::IPCResult AnswerLaunchApp(LaunchParameters&& aParams, diff --git a/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerParent.cpp b/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerParent.cpp index f59421d45473..faafc21a2ce7 100644 --- a/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerParent.cpp +++ b/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerParent.cpp @@ -27,7 +27,7 @@ RefPtr RemoteSandboxBrokerParent::Launch( // Note: we rely on the caller to keep this instance alive while we launch // the process, so that these closures point to valid memory. auto resolve = [this](base::ProcessHandle handle) { - mOpened = Open(mProcess->TakeChannel(), base::GetProcId(handle)); + mOpened = Open(mProcess->TakeInitialPort(), base::GetProcId(handle)); if (!mOpened) { mProcess->Destroy(); mProcess = nullptr; diff --git a/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerProcessChild.cpp b/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerProcessChild.cpp index a2628ebd4ca6..c9a3ac8ecb5c 100644 --- a/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerProcessChild.cpp +++ b/security/sandbox/win/src/remotesandboxbroker/RemoteSandboxBrokerProcessChild.cpp @@ -21,8 +21,8 @@ RemoteSandboxBrokerProcessChild::~RemoteSandboxBrokerProcessChild() {} bool RemoteSandboxBrokerProcessChild::Init(int aArgc, char* aArgv[]) { BackgroundHangMonitor::Startup(); - return mSandboxBrokerChild.Init(ParentPid(), IOThreadChild::message_loop(), - IOThreadChild::TakeChannel()); + return mSandboxBrokerChild.Init(ParentPid(), + IOThreadChild::TakeInitialPort()); } void RemoteSandboxBrokerProcessChild::CleanUp() {