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

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

Issue 337463002: Remove LoadModule SRPC for non-SFI mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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/loader/nonsfi/nonsfi_main.cc ('k') | ppapi/api/private/ppb_nacl_private.idl » ('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 0393b090ff1dff6f17d80086078d613d7c9427d8..a2b0c43562b5f311717262a889bb539c481be01b 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -296,6 +296,7 @@ int32_t FileDownloaderToPepperError(FileDownloader::Status status) {
void LaunchSelLdr(PP_Instance instance,
PP_Bool main_service_runtime,
const char* alleged_url,
+ const PP_NaClFileInfo* nexe_file_info,
PP_Bool uses_irt,
PP_Bool uses_ppapi,
PP_Bool uses_nonsfi_mode,
@@ -330,6 +331,9 @@ void LaunchSelLdr(PP_Instance instance,
if (uses_ppapi) {
routing_id = GetRoutingID(instance);
if (!routing_id) {
+ if (nexe_file_info->handle != PP_kInvalidFileHandle) {
+ base::ClosePlatformFile(nexe_file_info->handle);
+ }
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask(
FROM_HERE,
base::Bind(callback.func, callback.user_data,
@@ -352,15 +356,19 @@ void LaunchSelLdr(PP_Instance instance,
std::string error_message_string;
NaClLaunchResult launch_result;
+ content::RendererPpapiHost* host =
+ content::RendererPpapiHost::GetForPPInstance(instance);
if (!sender->Send(new NaClHostMsg_LaunchNaCl(
- NaClLaunchParams(instance_info.url.spec(),
- 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)),
+ NaClLaunchParams(
+ instance_info.url.spec(),
+ host->ShareHandleWithRemote(nexe_file_info->handle, true),
+ 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)),
&launch_result,
&error_message_string))) {
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask(
« no previous file with comments | « components/nacl/loader/nonsfi/nonsfi_main.cc ('k') | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698