Index: components/nacl/renderer/ppb_nacl_private_impl.cc |
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc |
index 237e6d9a02489276b1cff798c15867f722197055..c61dd2a2343db95b7ac07d9bb0c1dcced5cc8af2 100644 |
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc |
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc |
@@ -13,6 +13,7 @@ |
#include "base/rand_util.h" |
#include "components/nacl/common/nacl_host_messages.h" |
#include "components/nacl/common/nacl_messages.h" |
+#include "components/nacl/common/nacl_switches.h" |
#include "components/nacl/common/nacl_types.h" |
#include "components/nacl/renderer/pnacl_translation_resource_host.h" |
#include "components/nacl/renderer/trusted_plugin_channel.h" |
@@ -107,6 +108,7 @@ void LaunchSelLdr(PP_Instance instance, |
const char* alleged_url, |
PP_Bool uses_irt, |
PP_Bool uses_ppapi, |
+ PP_Bool uses_nonsfi_mode, |
PP_Bool enable_ppapi_dev, |
PP_Bool enable_dyncode_syscalls, |
PP_Bool enable_exception_handling, |
@@ -156,6 +158,7 @@ void LaunchSelLdr(PP_Instance instance, |
routing_id, |
perm_bits, |
PP_ToBool(uses_irt), |
+ PP_ToBool(uses_nonsfi_mode), |
PP_ToBool(enable_dyncode_syscalls), |
PP_ToBool(enable_exception_handling), |
PP_ToBool(enable_crash_throttling)), |
@@ -302,6 +305,15 @@ int32_t GetNumberOfProcessors() { |
return num_processors; |
} |
+PP_Bool IsNonSFIEnabled() { |
+#if defined(OS_LINUX) |
+ return PP_FromBool(CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kEnableNaClNonSfiMode)); |
+#else |
+ return PP_FALSE; |
+#endif |
+} |
+ |
int32_t GetNexeFd(PP_Instance instance, |
const char* pexe_url, |
uint32_t abi_version, |
@@ -549,6 +561,7 @@ const PPB_NaCl_Private nacl_interface = { |
&GetReadonlyPnaclFD, |
&CreateTemporaryFile, |
&GetNumberOfProcessors, |
+ &IsNonSFIEnabled, |
&GetNexeFd, |
&ReportTranslationFinished, |
&OpenNaClExecutable, |