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 50e5b2b8ec3026d6374e563232115215279dc55c..88a5cb33371158415b9b344ae157a313e7d5f943 100644 |
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc |
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc |
@@ -376,6 +376,32 @@ |
return; |
} |
+ 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); |
+ } |
+ } |
+ ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask( |
+ FROM_HERE, |
+ base::Bind(callback.func, callback.user_data, |
+ static_cast<int32_t>(PP_ERROR_FAILED))); |
+ return; |
+ } |
+ result_socket = launch_result.imc_channel_handle; |
+ instance_info.channel_handle = launch_result.ppapi_ipc_channel_handle; |
+ instance_info.plugin_pid = launch_result.plugin_pid; |
+ instance_info.plugin_child_id = launch_result.plugin_child_id; |
+ |
+ // Don't save instance_info if channel handle is invalid. |
+ if (IsValidChannelHandle(instance_info.channel_handle)) |
+ g_instance_info.Get()[instance] = instance_info; |
+ |
+ *(static_cast<NaClHandle*>(imc_handle)) = ToNativeHandle(result_socket); |
+ |
NexeLoadManager* load_manager = NexeLoadManager::Get(instance); |
DCHECK(load_manager); |
if (!load_manager) { |
@@ -383,30 +409,6 @@ |
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)) { |
- load_manager->ReportLoadError(PP_NACL_ERROR_SEL_LDR_LAUNCH, |
- "ServiceRuntime: failed to start", |
- error_message_string); |
- } |
- ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask( |
- FROM_HERE, |
- base::Bind(callback.func, callback.user_data, |
- static_cast<int32_t>(PP_ERROR_FAILED))); |
- return; |
- } |
- result_socket = launch_result.imc_channel_handle; |
- instance_info.channel_handle = launch_result.ppapi_ipc_channel_handle; |
- instance_info.plugin_pid = launch_result.plugin_pid; |
- instance_info.plugin_child_id = launch_result.plugin_child_id; |
- |
- // Don't save instance_info if channel handle is invalid. |
- if (IsValidChannelHandle(instance_info.channel_handle)) |
- g_instance_info.Get()[instance] = instance_info; |
- |
- *(static_cast<NaClHandle*>(imc_handle)) = ToNativeHandle(result_socket); |
// Store the crash information shared memory handle. |
load_manager->set_crash_info_shmem_handle( |
@@ -679,13 +681,6 @@ |
// Fast path only works for installed file URLs. |
GURL gurl(file_url); |
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()) |
return PP_kInvalidFileHandle; |
content::PepperPluginInstance* plugin_instance = |