diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-12 17:36:55 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-12 17:36:55 +0000 |
commit | cc8f146d34a3b13cd80d8b3530fd76445774b1c6 (patch) | |
tree | 65ddd346a7b468f716f0022507112ec7215a17f7 /chrome/browser/plugin_process_host.cc | |
parent | 9ab7d838fba71523a32d1b1e50e5d9a1c20815b2 (diff) | |
download | chromium_src-cc8f146d34a3b13cd80d8b3530fd76445774b1c6.zip chromium_src-cc8f146d34a3b13cd80d8b3530fd76445774b1c6.tar.gz chromium_src-cc8f146d34a3b13cd80d8b3530fd76445774b1c6.tar.bz2 |
Linux: refactor zygote support
http://code.google.com/p/chromium/wiki/LinuxZygote
* Move Chrome specific bits out of base
* Move away from the idea of reserved file descriptors (which don't really work
with zygotes)
* Load resources before forking renderers (means that we don't need
communication between the zygote process and the renderers)
* Make sure that gdb works against the browser again
* Make sure that we have different ASLR between the renderers and the browser.
http://codereview.chromium.org/119335
(This is a reland. First landed in r18109, reverted in r18112.)
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18291 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_process_host.cc')
-rw-r--r-- | chrome/browser/plugin_process_host.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index 921f860..5216755 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.cc @@ -14,6 +14,9 @@ #include "app/app_switches.h" #include "base/command_line.h" +#if defined(OS_POSIX) +#include "base/global_descriptors_posix.h" +#endif #include "base/file_path.h" #include "base/file_util.h" #include "base/file_version_info.h" @@ -30,6 +33,7 @@ #include "chrome/browser/renderer_host/browser_render_process_host.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/renderer_host/resource_dispatcher_host.h" +#include "chrome/common/chrome_descriptors.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_plugin_lib.h" #include "chrome/common/chrome_switches.h" @@ -393,10 +397,10 @@ bool PluginProcessHost::Init(const WebPluginInfo& info, // This code is duplicated with browser_render_process_host.cc, but // there's not a good place to de-duplicate it. base::file_handle_mapping_vector fds_to_map; - int src_fd = -1, dest_fd = -1; - channel().GetClientFileDescriptorMapping(&src_fd, &dest_fd); - if (src_fd > -1) - fds_to_map.push_back(std::pair<int, int>(src_fd, dest_fd)); + const int ipcfd = channel().GetClientFileDescriptor(); + if (ipcfd > -1) + fds_to_map.push_back(std::pair<int, int>( + ipcfd, kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor)); base::LaunchApp(cmd_line.argv(), fds_to_map, false, &process); #endif |