Index: chrome/browser/renderer_host/browser_render_process_host.cc |
=================================================================== |
--- chrome/browser/renderer_host/browser_render_process_host.cc (revision 25977) |
+++ chrome/browser/renderer_host/browser_render_process_host.cc (working copy) |
@@ -63,7 +63,7 @@ |
#if defined(OS_WIN) |
#include "app/win_util.h" |
#include "chrome/browser/sandbox_policy.h" |
-#elif defined(OS_LINUX) |
+#elif defined(OS_LINUX) || defined(OS_FREEBSD) |
#include "base/linux_util.h" |
#include "chrome/browser/zygote_host_linux.h" |
#include "chrome/browser/renderer_host/render_crash_handler_host_linux.h" |
@@ -238,7 +238,7 @@ |
if (process_.handle() && !run_renderer_in_process()) { |
if (zygote_child_) { |
-#if defined(OS_LINUX) |
+#if defined(OS_LINUX) || defined(OS_FREEBSD) |
Singleton<ZygoteHost>()->EnsureProcessTerminated(process_.handle()); |
#endif |
} else { |
@@ -397,11 +397,11 @@ |
in_process_renderer_.reset(new RendererMainThread(channel_id)); |
base::Thread::Options options; |
-#if !defined(OS_LINUX) |
+#if !defined(USE_X11) |
// In-process plugins require this to be a UI message loop. |
options.message_loop_type = MessageLoop::TYPE_UI; |
#else |
- // We can't have multiple UI loops on Linux, so we don't support |
+ // We can't have multiple UI loops on X, so we don't support |
// in-process plugins. |
options.message_loop_type = MessageLoop::TYPE_DEFAULT; |
#endif |
@@ -411,7 +411,7 @@ |
#if defined(OS_WIN) |
process = sandbox::StartProcess(&cmd_line); |
#elif defined(OS_POSIX) |
-#if defined(OS_LINUX) |
+#if defined(OS_LINUX) || defined(OS_FREEBSD) |
if (!has_cmd_prefix) { |
base::GlobalDescriptors::Mapping mapping; |
const int ipcfd = channel_->GetClientFileDescriptor(); |
@@ -431,7 +431,7 @@ |
base::file_handle_mapping_vector fds_to_map; |
const int ipcfd = channel_->GetClientFileDescriptor(); |
fds_to_map.push_back(std::make_pair(ipcfd, kPrimaryIPCChannel + 3)); |
-#if defined(OS_LINUX) |
+#if defined(OS_LINUX) || defined(OS_FREEBSD) |
const int crash_signal_fd = |
Singleton<RenderCrashHandlerHostLinux>()->GetDeathSignalSocket(); |
if (crash_signal_fd >= 0) { |
@@ -444,7 +444,7 @@ |
#endif // defined(OS_LINUX) |
base::LaunchApp(cmd_line.argv(), fds_to_map, false, &process); |
zygote_child_ = false; |
-#if defined(OS_LINUX) |
+#if defined(OS_LINUX) || defined(OS_FREEBSD) |
} |
#endif // defined(OS_LINUX) |
#endif // defined(OS_WIN) |
@@ -661,9 +661,9 @@ |
// On OSX, the browser allocates all DIBs and keeps a file descriptor around |
// for each. |
return widget_helper_->MapTransportDIB(dib_id); |
-#elif defined(OS_LINUX) |
+#elif defined(USE_X11) |
return TransportDIB::Map(dib_id); |
-#endif // defined(OS_LINUX) |
+#endif // defined(USE_X11) |
} |
TransportDIB* BrowserRenderProcessHost::GetTransportDIB( |
@@ -816,7 +816,7 @@ |
bool child_exited; |
bool did_crash; |
if (zygote_child_) { |
-#if defined(OS_LINUX) |
+#if defined(OS_LINUX) || defined(OS_FREEBSD) |
did_crash = Singleton<ZygoteHost>()->DidProcessCrash( |
process_.handle(), &child_exited); |
#else |