mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 691138 - ipc: fails to build darwin/x11. r=smichaud
This commit is contained in:
parent
b679a433d9
commit
b1d63ad959
@ -43,7 +43,7 @@
|
||||
#include "base/string_util.h"
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "chrome/common/process_watcher.h"
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
#include "chrome/common/mach_ipc_mac.h"
|
||||
#include "base/rand_util.h"
|
||||
#include "nsILocalFileMac.h"
|
||||
@ -106,7 +106,7 @@ GeckoChildProcessHost::GeckoChildProcessHost(GeckoProcessType aProcessType,
|
||||
mChannelInitialized(false),
|
||||
mDelegate(aDelegate),
|
||||
mChildProcessHandle(0)
|
||||
#if defined(XP_MACOSX)
|
||||
#if defined(MOZ_WIDGET_COCOA)
|
||||
, mChildTask(MACH_PORT_NULL)
|
||||
#endif
|
||||
{
|
||||
@ -132,7 +132,7 @@ GeckoChildProcessHost::~GeckoChildProcessHost()
|
||||
#endif
|
||||
);
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
#if defined(MOZ_WIDGET_COCOA)
|
||||
if (mChildTask != MACH_PORT_NULL)
|
||||
mach_port_deallocate(mach_task_self(), mChildTask);
|
||||
#endif
|
||||
@ -155,7 +155,7 @@ void GetPathToBinary(FilePath& exePath)
|
||||
nsCString path;
|
||||
greDir->GetNativePath(path);
|
||||
exePath = FilePath(path.get());
|
||||
#ifdef OS_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
// We need to use an App Bundle on OS X so that we can hide
|
||||
// the dock icon. See Bug 557225.
|
||||
exePath = exePath.AppendASCII(MOZ_CHILD_PROCESS_BUNDLE);
|
||||
@ -173,7 +173,7 @@ void GetPathToBinary(FilePath& exePath)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
class AutoCFTypeObject {
|
||||
public:
|
||||
AutoCFTypeObject(CFTypeRef object)
|
||||
@ -193,7 +193,7 @@ nsresult GeckoChildProcessHost::GetArchitecturesForBinary(const char *path, uint
|
||||
{
|
||||
*result = 0;
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
CFURLRef url = ::CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault,
|
||||
(const UInt8*)path,
|
||||
strlen(path),
|
||||
@ -239,7 +239,7 @@ nsresult GeckoChildProcessHost::GetArchitecturesForBinary(const char *path, uint
|
||||
|
||||
uint32 GeckoChildProcessHost::GetSupportedArchitecturesForProcessType(GeckoProcessType type)
|
||||
{
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
if (type == GeckoProcessType_Plugin) {
|
||||
// Cache this, it shouldn't ever change.
|
||||
static uint32 pluginContainerArchs = 0;
|
||||
@ -571,12 +571,12 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt
|
||||
// "false" == crash reporting disabled
|
||||
childArgv.push_back("false");
|
||||
}
|
||||
# elif defined(XP_MACOSX)
|
||||
# elif defined(MOZ_WIDGET_COCOA)
|
||||
childArgv.push_back(CrashReporter::GetChildNotificationPipe());
|
||||
# endif // OS_LINUX
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
// Add a mach port to the command line so the child can communicate its
|
||||
// 'task_t' back to the parent.
|
||||
//
|
||||
@ -599,7 +599,7 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt
|
||||
#endif
|
||||
false, &process, arch);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
// Wait for the child process to send us its 'task_t' data.
|
||||
const int kTimeoutMs = 10000;
|
||||
|
||||
@ -690,7 +690,7 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt
|
||||
return false;
|
||||
}
|
||||
SetHandle(process);
|
||||
#if defined(XP_MACOSX)
|
||||
#if defined(MOZ_WIDGET_COCOA)
|
||||
mChildTask = child_task;
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user