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

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

Issue 291973002: Pepper: DescWrapper cleanup in PnaclResources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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
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 063bb9128f1398c559b06de459f49d2c270f7feb..29d8d2eecfa6643b7401a9c1cf177c82f225d7a3 100644
--- a/ppapi/native_client/src/trusted/plugin/service_runtime.cc
+++ b/ppapi/native_client/src/trusted/plugin/service_runtime.cc
@@ -368,9 +368,12 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation(
if (PnaclUrls::IsPnaclComponent(mapped_url)) {
// Special PNaCl support files, that are installed on the
// user machine.
- int32_t fd = PnaclResources::GetPnaclFD(
- plugin_,
+ PP_FileHandle handle = plugin_->nacl_interface()->GetReadonlyPnaclFd(
PnaclUrls::PnaclComponentURLToFilename(mapped_url).c_str());
+ int32_t fd = -1;
+ if (handle != PP_kInvalidFileHandle)
+ fd = ConvertFileDescriptor(handle, true);
+
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

Powered by Google App Engine
This is Rietveld 408576698