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

Unified Diff: components/nacl/renderer/plugin/pnacl_resources.cc

Issue 1640523002: PNaCl cleanup: Reuse base::File for closing a handle/FD (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | components/nacl/renderer/plugin/utility.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/plugin/pnacl_resources.cc
diff --git a/components/nacl/renderer/plugin/pnacl_resources.cc b/components/nacl/renderer/plugin/pnacl_resources.cc
index dad0a1f42ca601ec920cffb56b22972d802279a2..92773e52a0d00f7c8338fd80b9d114d11c971b3f 100644
--- a/components/nacl/renderer/plugin/pnacl_resources.cc
+++ b/components/nacl/renderer/plugin/pnacl_resources.cc
@@ -8,6 +8,7 @@
#include <vector>
+#include "base/files/file.h"
#include "base/logging.h"
#include "components/nacl/renderer/plugin/plugin.h"
#include "components/nacl/renderer/plugin/utility.h"
@@ -35,8 +36,7 @@ PnaclResources::PnaclResources(Plugin* plugin, bool use_subzero)
PnaclResources::~PnaclResources() {
for (PnaclResourceEntry& entry : resources_) {
- if (entry.file_info.handle != PP_kInvalidFileHandle)
- CloseFileHandle(entry.file_info.handle);
+ base::File closer(entry.file_info.handle);
}
}
« no previous file with comments | « no previous file | components/nacl/renderer/plugin/utility.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698