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

Unified Diff: webkit/plugins/ppapi/ppb_url_loader_impl.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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_url_loader_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_url_loader_impl.cc b/webkit/plugins/ppapi/ppb_url_loader_impl.cc
index 28a39152c4be94702b09d07f215b9e6383d1de2c..f91d28e787a5ae7214c062214ab60183f8bd5e1d 100644
--- a/webkit/plugins/ppapi/ppb_url_loader_impl.cc
+++ b/webkit/plugins/ppapi/ppb_url_loader_impl.cc
@@ -85,12 +85,13 @@ PPB_URLLoader_Impl::PPB_URLLoader_Impl(PP_Instance instance,
}
PPB_URLLoader_Impl::~PPB_URLLoader_Impl() {
- // There is a path whereby the destructor for the loader_ member can
- // invoke InstanceWasDeleted() upon this PPB_URLLoader_Impl, thereby
- // re-entering the scoped_ptr destructor with the same scoped_ptr object
- // via loader_.reset(). Be sure that loader_ is first NULL then destroy
- // the scoped_ptr. See http://crbug.com/159429.
- scoped_ptr<WebKit::WebURLLoader> for_destruction_only(loader_.release());
+ // Removes the resource from the ResourceTracker's tables. This normally
+ // happens as part of Resource destruction, but if a subclass destructor
+ // has a risk of re-entering destruction via the ResourceTracker, it can
+ // call this explicitly to get rid of the table entry before continuing
+ // with the destruction. If the resource is not in the ResourceTracker's
+ // tables, silently does nothing. See http://crbug.com/159429.
+ RemoveFromResourceTracker();
}
PPB_URLLoader_API* PPB_URLLoader_Impl::AsPPB_URLLoader_API() {
« no previous file with comments | « ppapi/shared_impl/resource.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698