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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.cc

Issue 10386080: Rename nacl::RefCounted to nacl::RefCountedThreadSafe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: License bump Created 8 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/shared/ppapi_proxy/plugin_ppb_image_data.cc
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.cc b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.cc
index 297918d2915793a573518bd5358a12e45b3d2bfb..2bff66d7eec71113258cc00a6d3c85416e8d0d3c 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.cc
+++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.cc
@@ -141,14 +141,6 @@ PluginImageData::PluginImageData()
memset(&desc_, 0, sizeof(desc_));
}
-PluginImageData::~PluginImageData() {
- Unmap();
- if (shm_fd_ != -1) {
- close(shm_fd_);
- shm_fd_ = -1;
- }
-}
-
bool PluginImageData::InitFromBrowserResource(PP_Resource resource) {
nacl_abi_size_t desc_size = static_cast<nacl_abi_size_t>(sizeof(desc_));
int32_t success = PP_FALSE;
@@ -185,4 +177,12 @@ void PluginImageData::Unmap() {
}
}
+PluginImageData::~PluginImageData() {
+ Unmap();
+ if (shm_fd_ != -1) {
+ close(shm_fd_);
+ shm_fd_ = -1;
+ }
+}
+
} // namespace ppapi_proxy

Powered by Google App Engine
This is Rietveld 408576698