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

Unified Diff: chrome/browser/worker_host/worker_process_host.cc

Issue 155015: Make workers functional on OSX and Linux. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/worker_host/worker_process_host.cc
===================================================================
--- chrome/browser/worker_host/worker_process_host.cc (revision 20549)
+++ chrome/browser/worker_host/worker_process_host.cc (working copy)
@@ -8,6 +8,9 @@
#include "base/command_line.h"
#include "base/debug_util.h"
+#if defined(OS_POSIX)
+#include "base/global_descriptors_posix.h"
+#endif
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/process_util.h"
@@ -16,6 +19,7 @@
#include "chrome/browser/child_process_security_policy.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/worker_host/worker_service.h"
+#include "chrome/common/chrome_descriptors.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/debug_flags.h"
#include "chrome/common/process_watcher.h"
@@ -98,7 +102,15 @@
#if defined(OS_WIN)
process = sandbox::StartProcess(&cmd_line);
#else
- 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;
+ const int ipcfd = channel().GetClientFileDescriptor();
+ if (ipcfd > -1) {
+ fds_to_map.push_back(std::pair<int, int>(
+ ipcfd, kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor));
jam 2009/07/13 23:30:22 nit: sorry I wasn't clear least time, two spaces o
+ }
+ base::LaunchApp(cmd_line.argv(), fds_to_map, false, &process);
#endif
if (!process)
return false;
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698