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 cd1aac300a1db4ecf3bdddea8c5b77644b5eef09..1598bbb7b3b7db57d7d5f448154f951f6e158ab6 100644 |
--- a/components/nacl/loader/nonsfi/nonsfi_listener.cc |
+++ b/components/nacl/loader/nonsfi/nonsfi_listener.cc |
@@ -27,6 +27,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( |
@@ -146,6 +149,16 @@ void NonSfiListener::OnStart(const nacl::NaClStartParams& params) { |
CHECK(params.nexe_file != IPC::InvalidPlatformFileForTransit()); |
CHECK(params.nexe_token_lo == 0); |
CHECK(params.nexe_token_hi == 0); |
+ |
+ std::vector<std::pair<std::string, int> > key_fd_pairs; |
+ 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); |
+ |
MainStart(IPC::PlatformFileForTransitToPlatformFile(params.nexe_file)); |
} |