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

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

Issue 12623004: Allow PNaCl NMF to set translator optimization options for experimentation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Default to -O0 instead of the default for now Created 7 years, 9 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
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/service_runtime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ea7c2624422fd900fda63823c9134838444e1636..00f64c767f6a178878b54eb5f95f40076d8f65af 100644
--- a/ppapi/native_client/src/trusted/plugin/service_runtime.cc
+++ b/ppapi/native_client/src/trusted/plugin/service_runtime.cc
@@ -259,9 +259,9 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation(
NaClLog(4, "Entered OpenManifestEntry_MainThreadContinuation\n");
std::string mapped_url;
- std::string cache_identity;
- if (!manifest_->ResolveKey(p->url, &mapped_url, &cache_identity,
- p->error_info, &p->pnacl_translate)) {
+ PnaclOptions pnacl_options;
+ if (!manifest_->ResolveKey(p->url, &mapped_url,
+ &pnacl_options, p->error_info)) {
NaClLog(4, "OpenManifestEntry_MainThreadContinuation: ResolveKey failed\n");
// Failed, and error_info has the details on what happened. Wake
// up requesting thread -- we are done.
@@ -274,18 +274,18 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation(
NaClLog(4,
"OpenManifestEntry_MainThreadContinuation: "
"ResolveKey: %s -> %s (pnacl_translate(%d))\n",
- p->url.c_str(), mapped_url.c_str(), p->pnacl_translate);
+ p->url.c_str(), mapped_url.c_str(), pnacl_options.translate());
open_cont = new OpenManifestEntryResource(*p); // copy ctor!
CHECK(open_cont != NULL);
open_cont->url = mapped_url;
- if (!open_cont->pnacl_translate) {
+ if (!pnacl_options.translate()) {
pp::CompletionCallback stream_cc = WeakRefNewCallback(
anchor_,
this,
&PluginReverseInterface::StreamAsFile_MainThreadContinuation,
open_cont);
- //
+ // Normal files.
if (!PnaclUrls::IsPnaclComponent(mapped_url)) {
if (!plugin_->StreamAsFile(mapped_url,
stream_cc.pp_completion_callback())) {
@@ -303,6 +303,8 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation(
NaClLog(4,
"OpenManifestEntry_MainThreadContinuation: StreamAsFile okay\n");
} else {
+ // Special PNaCl support files, that are installed on the
+ // user machine.
int32_t fd = PnaclResources::GetPnaclFD(
plugin_,
PnaclUrls::PnaclComponentURLToFilename(mapped_url).c_str());
@@ -325,6 +327,7 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation(
"OpenManifestEntry_MainThreadContinuation: GetPnaclFd okay\n");
}
} else {
+ // Requires PNaCl translation.
NaClLog(4,
"OpenManifestEntry_MainThreadContinuation: "
"pulling down and translating.\n");
@@ -339,7 +342,7 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation(
pnacl_coordinator_.reset(
PnaclCoordinator::BitcodeToNative(plugin_,
mapped_url,
- cache_identity,
+ pnacl_options,
translate_callback));
} else {
nacl::MutexLocker take(&mu_);
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/service_runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698