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

Unified Diff: components/nacl/renderer/ppb_nacl_private_impl.cc

Issue 177113009: Support non-SFI mode in NaCl manifest file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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.cc ('k') | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7f7876cb0afd0e1f3b02ef1c0acdbe04a87659f1..a5103aaf36f4e1c61e972e4c30a3b737cb5508b7 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -106,6 +106,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,
@@ -155,6 +156,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)),
@@ -300,6 +302,15 @@ int32_t GetNumberOfProcessors() {
return num_processors;
}
+PP_Bool IsNonSFIModeEnabled() {
+#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,
@@ -552,6 +563,7 @@ const PPB_NaCl_Private nacl_interface = {
&GetReadonlyPnaclFD,
&CreateTemporaryFile,
&GetNumberOfProcessors,
+ &IsNonSFIModeEnabled,
&GetNexeFd,
&ReportTranslationFinished,
&OpenNaClExecutable,
« no previous file with comments | « components/nacl/loader/nacl_listener.cc ('k') | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698