Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Unified Diff: components/nacl/loader/nonsfi/nonsfi_listener.cc

Issue 649603004: Non-SFI NaCl: Batch-open resource files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 d0d51f1083863f8e9f1f25425747b053687ee36f..57e6e03b949c6e27c0886ea5dfb79b60076dc21b 100644
--- a/components/nacl/loader/nonsfi/nonsfi_listener.cc
+++ b/components/nacl/loader/nonsfi/nonsfi_listener.cc
@@ -18,6 +18,7 @@
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_switches.h"
#include "ipc/ipc_sync_channel.h"
+#include "ppapi/nacl_irt/irt_manifest.h"
#include "ppapi/nacl_irt/plugin_startup.h"
#if defined(OS_NACL_NONSFI)
@@ -156,6 +157,15 @@ void NonSfiListener::OnStart(const nacl::NaClStartParams& params) {
CHECK(params.nexe_file != IPC::InvalidPlatformFileForTransit());
CHECK(params.nexe_file_path_metadata.empty());
+ std::map<std::string, int> key_fd_map;
+ for (size_t i = 0; i < params.resource_files.size(); ++i) {
+ key_fd_map.insert(std::make_pair(
Mark Seaborn 2015/02/12 03:57:33 Can you add a check analogous to CHECK(params.ne
Yusuke Sato 2015/02/13 23:01:17 Done.
+ params.resource_files[i].file_key,
+ IPC::PlatformFileForTransitToPlatformFile(
+ params.resource_files[i].file)));
+ }
+ ppapi::RegisterPreopenedDescriptorsNonSfi(key_fd_map);
+
MainStart(IPC::PlatformFileForTransitToPlatformFile(params.nexe_file));
}

Powered by Google App Engine
This is Rietveld 408576698