Bug 1285157 - Remove SetTransport(aChannel) for NUWA r?cyu
MozReview-Commit-ID: HR8r9flyJDQ
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -624,20 +624,16 @@ ContentChild::Init(MessageLoop* aIOLoop,
nsQAppInstance::AddRef();
#endif
#ifdef MOZ_X11
// Do this after initializing GDK, or GDK will install its own handler.
XRE_InstallX11ErrorHandler();
#endif
-#ifdef MOZ_NUWA_PROCESS
- SetTransport(aChannel);
-#endif
-
NS_ASSERTION(!sSingleton, "only one ContentChild per child");
// Once we start sending IPC messages, we need the thread manager to be
// initialized so we can deal with the responses. Do that here before we
// try to construct the crash reporter.
nsresult rv = nsThreadManager::get()->Init();
if (NS_WARN_IF(NS_FAILED(rv))) {
return false;
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -2313,17 +2313,16 @@ ContentParent::ContentParent(ContentPare
NS_ASSERTION(fd != nullptr, "IPC Channel for PContent is necessary!");
mSubprocess = new GeckoExistingProcessHost(GeckoProcessType_Content,
aPid, *fd);
mSubprocess->LaunchAndWaitForProcessHandle();
// Clone actors routed by aTemplate for this instance.
- IToplevelProtocol::SetTransport(mSubprocess->GetChannel());
ProtocolCloneContext cloneContext;
cloneContext.SetContentParent(this);
CloneManagees(aTemplate, &cloneContext);
CloneOpenedToplevels(aTemplate, aFds, aPid, &cloneContext);
Open(mSubprocess->GetChannel(),
base::GetProcId(mSubprocess->GetChildProcessHandle()));
--- a/ipc/glue/ProcessUtils_linux.cpp
+++ b/ipc/glue/ProcessUtils_linux.cpp
@@ -213,19 +213,19 @@ ProcLoaderClientGeckoInit()
return;
}
sProcLoaderClientGeckoInitialized = true;
TransportDescriptor fd;
fd.mFd = base::FileDescriptor(sProcLoaderChannelFd, /*auto_close=*/ false);
sProcLoaderChannelFd = -1;
- Transport *transport = OpenDescriptor(fd, Transport::MODE_CLIENT);
+ UniquePtr<Transport> transport = OpenDescriptor(fd, Transport::MODE_CLIENT);
sProcLoaderParent = new ProcLoaderParent();
- sProcLoaderParent->Open(transport,
+ sProcLoaderParent->Open(transport.get(),
sProcLoaderPid,
XRE_GetIOMessageLoop(),
ParentSide);
sProcLoaderLoop = MessageLoop::current();
}
bool ProcLoaderIsInitialized()
{
@@ -564,21 +564,21 @@ ProcLoaderServiceRun(pid_t aPeerPid, int
MOZ_ASSERT(!sProcLoaderServing);
MessageLoop loop;
nsAutoPtr<ContentProcess> process;
process = new ContentProcess(aPeerPid);
ChildThread *iothread = process->child_thread();
- Transport *transport = OpenDescriptor(fd, Transport::MODE_CLIENT);
+ UniquePtr<Transport> transport = OpenDescriptor(fd, Transport::MODE_CLIENT);
ProcLoaderChild *loaderChild = new ProcLoaderChild(aPeerPid);
// Pass a message loop to initialize (connect) the channel
// (connection).
- loaderChild->Open(transport, aPeerPid, iothread->message_loop());
+ loaderChild->Open(transport.get(), aPeerPid, iothread->message_loop());
BackgroundHangMonitor::Prohibit();
sProcLoaderServing = true;
loop.Run();
BackgroundHangMonitor::Allow();