| 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 e7150e6ddfce0c89d4b757c7681ba088dbdc9495..284f95db2159d0bdaf153531e17a12a1df5e0bf3 100644
|
| --- a/components/nacl/renderer/ppb_nacl_private_impl.cc
|
| +++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
|
| @@ -252,6 +252,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,
|
| @@ -285,6 +286,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,
|
| @@ -307,15 +311,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(
|
|
|