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

Unified Diff: chrome/nacl/nacl_helper_linux.cc

Issue 10387218: Make GlobalDescriptors::MaybeGet return -1 when the key is not found. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing NaCl tests. Created 8 years, 6 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/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc ('k') | ipc/ipc.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/nacl/nacl_helper_linux.cc
diff --git a/chrome/nacl/nacl_helper_linux.cc b/chrome/nacl/nacl_helper_linux.cc
index a668ec4bf67867e4168e0dfdba6a147f5d008e87..b16f2cdf6845ca257facd5fe88e12660508bd236 100644
--- a/chrome/nacl/nacl_helper_linux.cc
+++ b/chrome/nacl/nacl_helper_linux.cc
@@ -19,12 +19,14 @@
#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/eintr_wrapper.h"
+#include "base/global_descriptors_posix.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/posix/unix_domain_socket.h"
#include "base/rand_util.h"
#include "chrome/nacl/nacl_listener.h"
#include "crypto/nss_util.h"
+#include "ipc/ipc_descriptors.h"
#include "ipc/ipc_switches.h"
#include "native_client/src/trusted/service_runtime/sel_addrspace.h"
@@ -41,8 +43,9 @@ void BecomeNaClLoader(const std::vector<int>& child_fds) {
// don't need zygote FD any more
if (HANDLE_EINTR(close(kNaClZygoteDescriptor)) != 0)
LOG(ERROR) << "close(kNaClZygoteDescriptor) failed.";
- // Set up browser descriptor as expected by Chrome on fd 3
- // The zygote takes care of putting the sandbox IPC channel on fd 5
+ // Set up browser descriptor on fd 3 and IPC as expected by Chrome.
+ base::GlobalDescriptors::GetInstance()->Set(kPrimaryIPCChannel,
+ kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor);
int zfd = dup2(child_fds[kNaClBrowserFDIndex], kNaClBrowserDescriptor);
if (zfd != kNaClBrowserDescriptor) {
LOG(ERROR) << "Could not initialize kNaClBrowserDescriptor";
« no previous file with comments | « chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc ('k') | ipc/ipc.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698