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

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

Issue 10815080: Add an interface for nacl to create delete-on-close temp files, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert buildbot hack Created 8 years, 5 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/pnacl_translate_thread.cc
diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc b/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc
index 190d434e0d2453863b322812420255ca7b2002d8..145a09a8b6c2f897aab2bdfdebaebe6e1c767462 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc
@@ -8,6 +8,7 @@
#include "native_client/src/trusted/plugin/plugin.h"
#include "native_client/src/trusted/plugin/pnacl_resources.h"
#include "native_client/src/trusted/plugin/srpc_params.h"
+#include "native_client/src/trusted/plugin/temporary_file.h"
#include "native_client/src/trusted/plugin/utility.h"
namespace plugin {
@@ -60,7 +61,13 @@ bool PnaclTranslateThread::RunLdSubprocess(int is_shared_library,
}
// Run LD.
SrpcParams params;
- nacl::DescWrapper* ld_in_file = obj_file_->read_wrapper();
+
+ // Reset object file for reading first.
+ if (!obj_file_->Reset()) {
+ TranslateFailed("Link process could not reset object file");
+ return false;
+ }
+ nacl::DescWrapper* ld_in_file = obj_file_->get_wrapper();
nacl::DescWrapper* ld_out_file = nexe_file_->write_wrapper();
PluginReverseInterface* ld_reverse =
ld_subprocess->service_runtime()->rev_interface();

Powered by Google App Engine
This is Rietveld 408576698