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

Unified Diff: ppapi/cpp/resource.cc

Issue 52233002: [PPAPI] Added VarResource_Dev class. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix Windows compile. Created 7 years, 1 month 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 | « ppapi/cpp/resource.h ('k') | ppapi/cpp/var.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/resource.cc
diff --git a/ppapi/cpp/resource.cc b/ppapi/cpp/resource.cc
index 3ccc198b3b116ac7e842fd9f53bcb91032c0c7cb..804d34d2c30efd931b5c70ada398d2fadb474837 100644
--- a/ppapi/cpp/resource.cc
+++ b/ppapi/cpp/resource.cc
@@ -52,4 +52,11 @@ void Resource::PassRefFromConstructor(PP_Resource resource) {
pp_resource_ = resource;
}
+void Resource::Clear() {
+ if (is_null())
+ return;
+ Module::Get()->core()->ReleaseResource(pp_resource_);
+ pp_resource_ = 0;
+}
+
} // namespace pp
« no previous file with comments | « ppapi/cpp/resource.h ('k') | ppapi/cpp/var.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698