| 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..9ee0c161a1d37637f52a3ae1610e0d12d6ace255 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,11 @@ 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;
|
| +
|
| content::PepperPluginInstance* plugin_instance =
|
| content::PepperPluginInstance::Get(instance);
|
| if (!plugin_instance)
|
| @@ -705,6 +708,7 @@ PP_FileHandle OpenNaClExecutable(PP_Instance instance,
|
| if (!sender->Send(
|
| new NaClHostMsg_OpenNaClExecutable(GetRoutingID(instance),
|
| GURL(file_url),
|
| + !load_manager->nonsfi(),
|
| &out_fd,
|
| nonce_lo,
|
| nonce_hi))) {
|
|
|