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

Unified Diff: ppapi/shared_impl/resource.cc

Issue 14695002: Remove Pepper URLLoader from resource tracker early. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move TODO to logical place. Created 7 years, 8 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 | « ppapi/shared_impl/resource.h ('k') | webkit/plugins/ppapi/ppb_url_loader_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/resource.cc
diff --git a/ppapi/shared_impl/resource.cc b/ppapi/shared_impl/resource.cc
index f1db8dee48d72011618e88b729ea61860ffb6e7e..2c409618c006aec83b4d7c196c23df067b2d3737 100644
--- a/ppapi/shared_impl/resource.cc
+++ b/ppapi/shared_impl/resource.cc
@@ -45,7 +45,7 @@ Resource::Resource(Untracked) {
}
Resource::~Resource() {
- PpapiGlobals::Get()->GetResourceTracker()->RemoveResource(this);
+ RemoveFromResourceTracker();
}
PP_Resource Resource::GetReference() {
@@ -79,6 +79,10 @@ void Resource::Log(PP_LogLevel level, const std::string& message) {
message);
}
+void Resource::RemoveFromResourceTracker() {
+ PpapiGlobals::Get()->GetResourceTracker()->RemoveResource(this);
+}
+
#define DEFINE_TYPE_GETTER(RESOURCE) \
thunk::RESOURCE* Resource::As##RESOURCE() { return NULL; }
FOR_ALL_PPAPI_RESOURCE_APIS(DEFINE_TYPE_GETTER)
« no previous file with comments | « ppapi/shared_impl/resource.h ('k') | webkit/plugins/ppapi/ppb_url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698