Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2122)

Unified Diff: chrome/browser/plugin_process_host.cc

Issue 79020: linux (and some posix): multiprocess plugins compiling. (Closed)
Patch Set: rebased Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_process_host.cc
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index 9ed3dbf9dfd72fcce7cd4a0d786d4c7d317cdde8..833b5934636c181b8e16b411770e49ff7aec2151 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -390,8 +390,14 @@ bool PluginProcessHost::Init(const WebPluginInfo& info,
#if defined(OS_WIN)
process = sandbox::StartProcess(&cmd_line);
#else
- // spawn child process
- base::LaunchApp(cmd_line, false, false, &process);
+ // 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));
+ base::LaunchApp(cmd_line.argv(), fds_to_map, false, &process);
#endif
if (!process)
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698