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

Side by Side Diff: chrome/nacl/nacl_fork_delegate_linux.cc

Issue 7839007: Revert nacl_helper while working out developer build issues (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_exe.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/nacl_fork_delegate_linux.h" 5 #include "chrome/common/nacl_fork_delegate_linux.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 10
(...skipping 28 matching lines...) Expand all
39 // Confirm a couple hard-wired assumptions. 39 // Confirm a couple hard-wired assumptions.
40 // The NaCl constants are from chrome/nacl/nacl_linux_helper.h 40 // The NaCl constants are from chrome/nacl/nacl_linux_helper.h
41 DCHECK(kNaClBrowserDescriptor == browserdesc); 41 DCHECK(kNaClBrowserDescriptor == browserdesc);
42 DCHECK(kNaClSandboxDescriptor == sandboxdesc); 42 DCHECK(kNaClSandboxDescriptor == sandboxdesc);
43 43
44 CHECK(socketpair(PF_UNIX, SOCK_SEQPACKET, 0, fds) == 0); 44 CHECK(socketpair(PF_UNIX, SOCK_SEQPACKET, 0, fds) == 0);
45 base::file_handle_mapping_vector fds_to_map; 45 base::file_handle_mapping_vector fds_to_map;
46 fds_to_map.push_back(std::make_pair(fds[1], kNaClZygoteDescriptor)); 46 fds_to_map.push_back(std::make_pair(fds[1], kNaClZygoteDescriptor));
47 fds_to_map.push_back(std::make_pair(sandboxdesc, kNaClSandboxDescriptor)); 47 fds_to_map.push_back(std::make_pair(sandboxdesc, kNaClSandboxDescriptor));
48 ready_ = false; 48 ready_ = false;
49 return; // disabling nacl_helper for now
49 FilePath helper_exe; 50 FilePath helper_exe;
50 FilePath helper_bootstrap_exe; 51 FilePath helper_bootstrap_exe;
51 if (PathService::Get(chrome::FILE_NACL_HELPER, &helper_exe) && 52 if (PathService::Get(chrome::FILE_NACL_HELPER, &helper_exe) &&
52 PathService::Get(chrome::FILE_NACL_HELPER_BOOTSTRAP, 53 PathService::Get(chrome::FILE_NACL_HELPER_BOOTSTRAP,
53 &helper_bootstrap_exe) && 54 &helper_bootstrap_exe) &&
54 !RunningOnValgrind()) { 55 !RunningOnValgrind()) {
55 CommandLine cmd_line(helper_bootstrap_exe); 56 CommandLine cmd_line(helper_bootstrap_exe);
56 cmd_line.AppendArgPath(helper_exe); 57 cmd_line.AppendArgPath(helper_exe);
57 cmd_line.AppendArgNative(kNaClHelperAtZero); 58 cmd_line.AppendArgNative(kNaClHelperAtZero);
58 base::LaunchOptions options; 59 base::LaunchOptions options;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 119
119 bool NaClForkDelegate::AckChild(const int fd, 120 bool NaClForkDelegate::AckChild(const int fd,
120 const std::string& channel_switch) { 121 const std::string& channel_switch) {
121 int nwritten = HANDLE_EINTR(write(fd, channel_switch.c_str(), 122 int nwritten = HANDLE_EINTR(write(fd, channel_switch.c_str(),
122 channel_switch.length())); 123 channel_switch.length()));
123 if (nwritten != static_cast<int>(channel_switch.length())) { 124 if (nwritten != static_cast<int>(channel_switch.length())) {
124 return false; 125 return false;
125 } 126 }
126 return true; 127 return true;
127 } 128 }
OLDNEW
« no previous file with comments | « chrome/chrome_exe.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698