From b99305007faca0bd23b219914e1046b3d47abb0e Mon Sep 17 00:00:00 2001 From: Eric Rahm Date: Mon, 10 Apr 2017 14:50:00 -0700 Subject: [PATCH] Bug 1351910 - Build more files as unified in ipc/glue. r=billm One file was excluded for using plarena which it did not. The other was excluded for "clashes with strdup," it does not use strdup. MozReview-Commit-ID: 5X5H9S4j903 --- ipc/glue/IPCStreamUtils.cpp | 3 +++ ipc/glue/moz.build | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ipc/glue/IPCStreamUtils.cpp b/ipc/glue/IPCStreamUtils.cpp index 4cae37fc701e..909a7d274d66 100644 --- a/ipc/glue/IPCStreamUtils.cpp +++ b/ipc/glue/IPCStreamUtils.cpp @@ -23,8 +23,11 @@ #include "nsIAsyncInputStream.h" #include "nsIAsyncOutputStream.h" #include "nsIPipe.h" +#include "nsNetCID.h" #include "nsStreamUtils.h" +using namespace mozilla::dom; + namespace mozilla { namespace ipc { diff --git a/ipc/glue/moz.build b/ipc/glue/moz.build index b9f54d4518d0..5df36916e2b5 100644 --- a/ipc/glue/moz.build +++ b/ipc/glue/moz.build @@ -158,19 +158,27 @@ UNIFIED_SOURCES += [ 'SharedMemory.cpp', 'Shmem.cpp', 'StringUtil.cpp', + 'URIUtils.cpp', ] -# GeckoChildProcessHost.cpp cannot be built in unified mode because it uses plarena.h. -# URIUtils.cpp cannot be built in unified mode because of name clashes on strdup. SOURCES += [ 'BackgroundChildImpl.cpp', 'BackgroundParentImpl.cpp', 'FileDescriptorSetChild.cpp', 'FileDescriptorSetParent.cpp', - 'GeckoChildProcessHost.cpp', - 'URIUtils.cpp', ] +if CONFIG['OS_ARCH'] == 'Darwin': + # GeckoChildProcessHost.cpp cannot be built unified due to OSX header + # clashes with TextRange. + SOURCES += [ + 'GeckoChildProcessHost.cpp', + ] +else: + UNIFIED_SOURCES += [ + 'GeckoChildProcessHost.cpp', + ] + if CONFIG['_MSC_VER']: # This is intended as a temporary hack to support building with VS2015. # 'reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size