Index: components/nacl/loader/nacl_listener.cc |
diff --git a/components/nacl/loader/nacl_listener.cc b/components/nacl/loader/nacl_listener.cc |
index f5c282ae461f8dd87aef5f5cbbc7e8eeb68cbb0b..64083aec894a556c9d63cf510fb4b5eb6794e5bf 100644 |
--- a/components/nacl/loader/nacl_listener.cc |
+++ b/components/nacl/loader/nacl_listener.cc |
@@ -33,6 +33,8 @@ |
#endif |
#if defined(OS_LINUX) |
+#include <fcntl.h> |
+ |
#include "components/nacl/loader/nonsfi/irt_random.h" |
#include "components/nacl/loader/nonsfi/nonsfi_main.h" |
#include "content/public/common/child_process_sandbox_support_linux.h" |
@@ -468,9 +470,15 @@ void NaClListener::StartNonSfi(const nacl::NaClStartParams& params) { |
CHECK(params.debug_stub_server_bound_socket.fd == -1); |
CHECK(!params.uses_irt); |
+ // TODO(hidehiko): Currently imc bootstrap handle is still sent to the |
+ // plugin. Get rid of this. |
CHECK(params.handles.size() == 1); |
- int imc_bootstrap_handle = nacl::ToNativeHandle(params.handles[0]); |
- nacl::nonsfi::MainStart(imc_bootstrap_handle); |
+ |
+ CHECK(params.nexe_file != IPC::InvalidPlatformFileForTransit()); |
+ NaClFileInfo nexe_file_info = {}; |
Mark Seaborn
2014/06/18 19:53:12
Since we don't need validation caching here, you s
hidehiko
2014/06/19 07:01:59
Done. No need to change DEPS, as it already has sr
|
+ nexe_file_info.desc = |
+ IPC::PlatformFileForTransitToPlatformFile(params.nexe_file); |
+ nacl::nonsfi::MainStart(NaClDescIoFromFileInfo(nexe_file_info, O_RDONLY)); |
Mark Seaborn
2014/06/18 19:53:12
Pedantically, this should be NACL_ABI_O_RDONLY rat
hidehiko
2014/06/19 07:01:59
Done.
|
#endif // defined(OS_LINUX) |
} |