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

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

Issue 299143004: Pepper: TempFile cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Saner fd behavior Created 6 years, 7 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 | « no previous file | ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/native_client/src/trusted/plugin/plugin.cc
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.cc b/ppapi/native_client/src/trusted/plugin/plugin.cc
index c7b7fcc4971e0297b6bd93d837f3969dd473fc68..22afedb706c7fb97174e8e51379d989b15dae75f 100644
--- a/ppapi/native_client/src/trusted/plugin/plugin.cc
+++ b/ppapi/native_client/src/trusted/plugin/plugin.cc
@@ -485,10 +485,11 @@ void Plugin::BitcodeDidTranslate(int32_t pp_error) {
}
// Inform JavaScript that we successfully translated the bitcode to a nexe.
- nacl::scoped_ptr<nacl::DescWrapper>
- wrapper(pnacl_coordinator_.get()->ReleaseTranslatedFD());
+ PP_FileHandle handle = pnacl_coordinator_->TakeTranslatedFileHandle();
+ int32_t fd = ConvertFileDescriptor(handle, true);
+ nacl::DescWrapper* wrapper = wrapper_factory()->MakeFileDesc(fd, O_RDONLY);
LoadNaClModule(
- wrapper.release(),
+ wrapper,
false, /* uses_nonsfi_mode */
false, /* enable_dyncode_syscalls */
false, /* enable_exception_handling */
« no previous file with comments | « no previous file | ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698