Index: ppapi/proxy/url_loader_resource.cc |
diff --git a/ppapi/proxy/url_loader_resource.cc b/ppapi/proxy/url_loader_resource.cc |
index 5bbc9372ff2dbea3af1b098d4a70a2673a93c211..8258959dc817a79774996d2d5e473b87bc8c8bfe 100644 |
--- a/ppapi/proxy/url_loader_resource.cc |
+++ b/ppapi/proxy/url_loader_resource.cc |
@@ -68,6 +68,12 @@ URLLoaderResource::URLLoaderResource(Connection connection, |
} |
URLLoaderResource::~URLLoaderResource() { |
+ // Destroying a URLLoaderResource can cause the page to tear down the plugin |
yzshen1
2013/09/06 22:07:47
I don't quite understand under what circumstances
|
+ // instance. For in-process plugins, this can happen before the base Resource |
+ // class destructor runs, which removes this from the resource tracker. The |
+ // instance tear down code will then attempt to call methods on this partially |
+ // destructed object. Remove this from the tracker early to avoid this. |
+ RemoveFromResourceTracker(); |
} |
PPB_URLLoader_API* URLLoaderResource::AsPPB_URLLoader_API() { |