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 cb94ca2b79d1af199bf68446e9d240cf28a78421..89931cee6f2fb7363035b6bc05b474c17c56df3e 100644 |
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc |
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc |
@@ -302,6 +302,10 @@ void LaunchSelLdr(PP_Instance instance, |
CHECK(ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()-> |
BelongsToCurrentThread()); |
+ // FIXME: Remove this. |
bbudge
2014/06/30 18:28:53
Remove this.
teravest
2014/06/30 22:04:56
Done.
|
+ // base::PlatformFileInfo info; |
+ // CHECK(GetPlatformFileInfo(nexe_file_info->handle, &info)); |
+ |
// Create the manifest service proxy here, so on error case, it will be |
// destructed (without passing it to ManifestServiceChannel). |
scoped_ptr<ManifestServiceChannel::Delegate> manifest_service_proxy( |
@@ -343,12 +347,22 @@ void LaunchSelLdr(PP_Instance instance, |
std::string error_message_string; |
NaClLaunchResult launch_result; |
- content::RendererPpapiHost* host = |
- content::RendererPpapiHost::GetForPPInstance(instance); |
+ IPC::PlatformFileForTransit nexe_for_transit; |
+#if defined(OS_POSIX) |
+ if (nexe_file_info->handle != PP_kInvalidFileHandle) |
Mark Seaborn
2014/06/30 20:01:03
If this is false, I think it leaves nexe_for_trans
teravest
2014/06/30 22:04:56
Done.
|
+ nexe_for_transit = base::FileDescriptor(nexe_file_info->handle, true); |
+#else |
bbudge
2014/06/30 18:28:53
nit: #elif defined(OS_WIN)
teravest
2014/06/30 22:04:56
Done.
|
+ // Handle duplication is handled on the browser side instead of the renderer. |
bbudge
2014/06/30 18:28:53
nit wording
// Duplicate the handle on the browser
teravest
2014/06/30 22:04:56
Done.
|
+ // This is because BrokerGetFileForProcess isn't part of content/public, and |
+ // it's simpler to do the duplication in the browser anyway. |
+ nexe_for_transit = nexe_file_info->handle; |
+#endif |
if (!sender->Send(new NaClHostMsg_LaunchNaCl( |
NaClLaunchParams( |
instance_info.url.spec(), |
- host->ShareHandleWithRemote(nexe_file_info->handle, true), |
+ nexe_for_transit, |
+ nexe_file_info->token_lo, |
+ nexe_file_info->token_hi, |
routing_id, |
perm_bits, |
PP_ToBool(uses_irt), |