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

Unified Diff: ppapi/native_client/src/trusted/plugin/service_runtime.cc

Issue 224803002: Enable mmap and identity-based validation caching on pnacl-{llc,ld}.nexe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix token handover for main nexe Created 6 years, 8 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: ppapi/native_client/src/trusted/plugin/service_runtime.cc
diff --git a/ppapi/native_client/src/trusted/plugin/service_runtime.cc b/ppapi/native_client/src/trusted/plugin/service_runtime.cc
index 9df10ed2810dbe79ea859de312a507ba5c36307e..07730da940f5d2fa3724d8cadeaafb40181d7182 100644
--- a/ppapi/native_client/src/trusted/plugin/service_runtime.cc
+++ b/ppapi/native_client/src/trusted/plugin/service_runtime.cc
@@ -251,10 +251,16 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation(
if (PnaclUrls::IsPnaclComponent(mapped_url)) {
// Special PNaCl support files, that are installed on the
- // user machine.
+ // user machine. This is usually for libraries, so they are not
+ // executable and don't interact w/ mmap'ing and validation caching.
+ uint64_t file_token_lo;
+ uint64_t file_token_hi;
int32_t fd = PnaclResources::GetPnaclFD(
plugin_,
- PnaclUrls::PnaclComponentURLToFilename(mapped_url).c_str());
+ PnaclUrls::PnaclComponentURLToFilename(mapped_url).c_str(),
+ false /* is_executable */,
+ &file_token_lo,
+ &file_token_hi);
if (fd < 0) {
// We checked earlier if the pnacl component wasn't installed
// yet, so this shouldn't happen. At this point, we can't do much
@@ -265,8 +271,6 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation(
}
nacl::MutexLocker take(&mu_);
*p->op_complete_ptr = true; // done!
- // TODO(ncbray): enable the fast loading and validation paths for this
- // type of file.
p->file_info->desc = fd;
NaClXCondVarBroadcast(&cv_);
NaClLog(4,

Powered by Google App Engine
This is Rietveld 408576698