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

Unified Diff: components/nacl/loader/nacl_listener.cc

Issue 216603002: Tell nacl_helper to use non SFI mode in HandleForkRequest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « components/nacl/loader/nacl_listener.h ('k') | components/nacl/zygote/nacl_fork_delegate_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nacl_listener.cc
diff --git a/components/nacl/loader/nacl_listener.cc b/components/nacl/loader/nacl_listener.cc
index b5ee5f74fa0039b76c9bd1d75a347bd203df3bec..0d29487e86ea676d0326f0214a269637e47fd346 100644
--- a/components/nacl/loader/nacl_listener.cc
+++ b/components/nacl/loader/nacl_listener.cc
@@ -200,6 +200,7 @@ class BrowserValidationDBProxy : public NaClValidationDB {
NaClListener::NaClListener() : shutdown_event_(true, false),
io_thread_("NaCl_IOThread"),
+ uses_nonsfi_mode_(false),
#if defined(OS_LINUX)
prereserved_sandbox_size_(0),
#endif
@@ -257,6 +258,9 @@ bool NaClListener::OnMessageReceived(const IPC::Message& msg) {
}
void NaClListener::OnStart(const nacl::NaClStartParams& params) {
+#if !defined(OS_LINUX)
+ CHECK(!uses_nonsfi_mode_) << "Non-SFI NaCl is only supported on Linux";
+#endif
#if defined(OS_LINUX) || defined(OS_MACOSX)
int urandom_fd = dup(base::GetUrandomFD());
if (urandom_fd < 0) {
@@ -287,7 +291,7 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
ppapi_renderer_handle = IPC::Channel::GenerateVerifiedChannelID("nacl");
#if defined(OS_LINUX)
- if (params.uses_nonsfi_mode) {
+ if (uses_nonsfi_mode_) {
// In non-SFI mode, we neither intercept nor rewrite the message using
// NaClIPCAdapter, and the channels are connected between the plugin and
// the hosts directly. So, the IPC::Channel instances will be created in
@@ -421,7 +425,7 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
#endif
#if defined(OS_LINUX)
- if (params.uses_nonsfi_mode) {
+ if (uses_nonsfi_mode_) {
nacl::nonsfi::MainStart(args->imc_bootstrap_handle);
return;
}
« no previous file with comments | « components/nacl/loader/nacl_listener.h ('k') | components/nacl/zygote/nacl_fork_delegate_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698