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

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, 10 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
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..f59cbd5b69c3d712cc348fe6d413b8b046e7ba53 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -107,6 +107,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 +157,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 +304,16 @@ int32_t GetNumberOfProcessors() {
return num_processors;
}
+PP_Bool IsNonSFIEnabled() {
+ bool enabled;
+ IPC::Sender* sender = content::RenderThread::Get();
+ DCHECK(sender);
+ if (!sender->Send(new NaClHostMsg_NaClIsNonSFIEnabled(&enabled))) {
jvoung (off chromium) 2014/03/04 16:24:18 Btw, is this because the flag is not passed from t
Mark Seaborn 2014/03/04 16:34:00 Command line arguments don't work well for the NaC
jvoung (off chromium) 2014/03/04 16:39:42 I meant that this code could then use base/ for pa
Mark Seaborn 2014/03/04 17:29:07 Oh right, of course. :-) Yes, I agree it would ma
hidehiko 2014/03/05 08:15:33 Great to know. Done.
+ return PP_FALSE;
+ }
+ return PP_FromBool(enabled);
+}
+
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,

Powered by Google App Engine
This is Rietveld 408576698