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 88a5cb33371158415b9b344ae157a313e7d5f943..50e5b2b8ec3026d6374e563232115215279dc55c 100644 |
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc |
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc |
@@ -376,14 +376,20 @@ void LaunchSelLdr(PP_Instance instance, |
return; |
} |
+ NexeLoadManager* load_manager = NexeLoadManager::Get(instance); |
+ DCHECK(load_manager); |
+ if (!load_manager) { |
+ PostPPCompletionCallback(callback, PP_ERROR_FAILED); |
+ base::SharedMemory::CloseHandle(launch_result.crash_info_shmem_handle); |
+ return; |
+ } |
+ load_manager->set_nonsfi(PP_ToBool(uses_nonsfi_mode)); |
+ |
if (!error_message_string.empty()) { |
if (PP_ToBool(main_service_runtime)) { |
- NexeLoadManager* load_manager = NexeLoadManager::Get(instance); |
- if (load_manager) { |
- load_manager->ReportLoadError(PP_NACL_ERROR_SEL_LDR_LAUNCH, |
- "ServiceRuntime: failed to start", |
- error_message_string); |
- } |
+ load_manager->ReportLoadError(PP_NACL_ERROR_SEL_LDR_LAUNCH, |
+ "ServiceRuntime: failed to start", |
+ error_message_string); |
} |
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask( |
FROM_HERE, |
@@ -402,14 +408,6 @@ void LaunchSelLdr(PP_Instance instance, |
*(static_cast<NaClHandle*>(imc_handle)) = ToNativeHandle(result_socket); |
- NexeLoadManager* load_manager = NexeLoadManager::Get(instance); |
- DCHECK(load_manager); |
- if (!load_manager) { |
- PostPPCompletionCallback(callback, PP_ERROR_FAILED); |
- base::SharedMemory::CloseHandle(launch_result.crash_info_shmem_handle); |
- return; |
- } |
- |
// Store the crash information shared memory handle. |
load_manager->set_crash_info_shmem_handle( |
launch_result.crash_info_shmem_handle); |
@@ -683,6 +681,13 @@ PP_FileHandle OpenNaClExecutable(PP_Instance instance, |
if (!gurl.SchemeIs("chrome-extension")) |
return PP_kInvalidFileHandle; |
+ NexeLoadManager* load_manager = NexeLoadManager::Get(instance); |
+ DCHECK(load_manager); |
+ if (!load_manager) |
+ return PP_kInvalidFileHandle; |
+ if (load_manager->nonsfi()) |
Mark Seaborn
2015/01/12 21:25:45
So this caused a fallback to a slow path in the ca
|
+ return PP_kInvalidFileHandle; |
+ |
content::PepperPluginInstance* plugin_instance = |
content::PepperPluginInstance::Get(instance); |
if (!plugin_instance) |