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

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

Issue 836273002: Revert of Remove nonsfi token workaround. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/renderer/nexe_load_manager.cc ('k') | ppapi/nacl_irt/manifest_service.cc » ('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 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 =
« no previous file with comments | « components/nacl/renderer/nexe_load_manager.cc ('k') | ppapi/nacl_irt/manifest_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698