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

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

Issue 447013002: Pepper: Fix caching for translated nexes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/pnacl_coordinator.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/pnacl_coordinator.cc
diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
index c8d56c34bc93768f4ba946ba722815da4507301d..578153073126dfd0437747d9450e899a09bd3ec0 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
@@ -63,9 +63,11 @@ void DidCacheHit(void* user_data, PP_FileHandle nexe_file_handle) {
coordinator->BitcodeStreamCacheHit(nexe_file_handle);
}
-void DidCacheMiss(void* user_data, int64_t expected_pexe_size) {
+void DidCacheMiss(void* user_data, int64_t expected_pexe_size,
+ PP_FileHandle temp_nexe_file) {
PnaclCoordinator* coordinator = static_cast<PnaclCoordinator*>(user_data);
- coordinator->BitcodeStreamCacheMiss(expected_pexe_size);
+ coordinator->BitcodeStreamCacheMiss(expected_pexe_size,
+ temp_nexe_file);
}
void DidStreamData(void* user_data, const void* stream_data, int32_t length) {
@@ -329,7 +331,8 @@ void PnaclCoordinator::BitcodeStreamCacheHit(PP_FileHandle handle) {
NexeReadDidOpen(temp_nexe_file_->Open(false));
}
-void PnaclCoordinator::BitcodeStreamCacheMiss(int64_t expected_pexe_size) {
+void PnaclCoordinator::BitcodeStreamCacheMiss(int64_t expected_pexe_size,
+ PP_FileHandle nexe_handle) {
expected_pexe_size_ = expected_pexe_size;
for (int i = 0; i < split_module_count_; i++) {
@@ -348,8 +351,6 @@ void PnaclCoordinator::BitcodeStreamCacheMiss(int64_t expected_pexe_size) {
}
invalid_desc_wrapper_.reset(plugin_->wrapper_factory()->MakeInvalid());
- PP_FileHandle nexe_handle =
- plugin_->nacl_interface()->CreateTemporaryFile(plugin_->pp_instance());
temp_nexe_file_.reset(new TempFile(plugin_, nexe_handle));
// Open the nexe file for connecting ld and sel_ldr.
// Start translation when done with this last step of setup!
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698