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

Unified Diff: chrome/nacl/nacl_fork_delegate_linux.cc

Issue 7811013: Revert 98909 - Use chain-loading for Linux nacl_helper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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/nacl.gypi ('k') | chrome/nacl/nacl_helper_bootstrap_linux.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/nacl/nacl_fork_delegate_linux.cc
===================================================================
--- chrome/nacl/nacl_fork_delegate_linux.cc (revision 98909)
+++ chrome/nacl/nacl_fork_delegate_linux.cc (working copy)
@@ -26,8 +26,6 @@
sandboxed_(false),
fd_(-1) {}
-const char kNaClHelperAtZero[] = "--at-zero";
-
void NaClForkDelegate::Init(const bool sandboxed,
const int browserdesc,
const int sandboxdesc) {
@@ -50,18 +48,18 @@
const bool use_helper = CommandLine::ForCurrentProcess()->HasSwitch(
switches::kNaClLinuxHelper);
FilePath helper_exe;
- FilePath helper_bootstrap_exe;
- if (use_helper &&
- PathService::Get(chrome::FILE_NACL_HELPER, &helper_exe) &&
- PathService::Get(chrome::FILE_NACL_HELPER_BOOTSTRAP,
- &helper_bootstrap_exe)) {
+ if (use_helper && PathService::Get(chrome::FILE_NACL_HELPER, &helper_exe)) {
CommandLine::StringVector argv = CommandLine::ForCurrentProcess()->argv();
- argv[0] = helper_bootstrap_exe.value();
- argv[1] = helper_exe.value();
- argv[2] = kNaClHelperAtZero;
+ argv[0] = helper_exe.value();
base::LaunchOptions options;
options.fds_to_remap = &fds_to_map;
options.clone_flags = CLONE_FS | SIGCHLD;
+ // LD_BIND_NOW forces non-lazy binding in the dynamic linker, to
+ // prevent the linker from trying to look at the text of the nacl_helper
+ // program after it has been replaced by the nacl module.
+ base::environment_vector env;
+ env.push_back(std::make_pair("LD_BIND_NOW", "1"));
+ options.environ = &env;
ready_ = base::LaunchProcess(argv, options, NULL);
// parent and error cases are handled below
}
« no previous file with comments | « chrome/nacl.gypi ('k') | chrome/nacl/nacl_helper_bootstrap_linux.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698