Index: components/nacl/loader/nonsfi/nonsfi_listener.cc |
diff --git a/components/nacl/loader/nonsfi/nonsfi_listener.cc b/components/nacl/loader/nonsfi/nonsfi_listener.cc |
index 09f30b28f7dfa982294b7c96eb30271e3d653459..43cf8e66bc9e1673cecd9d82986365866287df45 100644 |
--- a/components/nacl/loader/nonsfi/nonsfi_listener.cc |
+++ b/components/nacl/loader/nonsfi/nonsfi_listener.cc |
@@ -33,6 +33,9 @@ |
namespace nacl { |
namespace nonsfi { |
+void RegisterPreopenedDescriptors( |
+ const std::vector<std::pair<std::string, int> >& key_fd_pairs); |
+ |
NonSfiListener::NonSfiListener() : io_thread_("NaCl_IOThread"), |
shutdown_event_(true, false) { |
io_thread_.StartWithOptions( |
@@ -156,6 +159,18 @@ void NonSfiListener::OnStart(const nacl::NaClStartParams& params) { |
CHECK(params.nexe_file != IPC::InvalidPlatformFileForTransit()); |
CHECK(params.nexe_file_path_metadata.empty()); |
+#if !defined(OS_NACL_NONSFI) |
hidehiko
2015/01/28 09:05:19
When we move the irt implementation to ppapi/nacl_
Mark Seaborn
2015/02/02 23:21:50
I don't understand why you need to conditionalise
Yusuke Sato
2015/02/04 02:00:29
removed
Yusuke Sato
2015/02/04 02:00:29
removed
|
+ std::vector<std::pair<std::string, int> > key_fd_pairs; |
Mark Seaborn
2015/02/02 23:21:50
You're converting to a std::vector here only to ha
Yusuke Sato
2015/02/04 02:00:29
Since params.resource_files is a struct defined in
Mark Seaborn
2015/02/04 18:52:16
I think it would be OK to add components/nacl/comm
Yusuke Sato
2015/02/05 07:21:13
Done.
|
+ for (size_t i = 0; i < params.resource_files.size(); ++i) { |
+ key_fd_pairs.push_back(std::make_pair( |
+ params.resource_files[i].file_key, |
+ IPC::PlatformFileForTransitToPlatformFile( |
+ params.resource_files[i].file))); |
+ } |
+ |
+ RegisterPreopenedDescriptors(key_fd_pairs); |
+#endif |
+ |
MainStart(IPC::PlatformFileForTransitToPlatformFile(params.nexe_file)); |
} |