summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/async_resource_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/renderer_host/async_resource_handler.cc')
-rw-r--r--content/browser/renderer_host/async_resource_handler.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/content/browser/renderer_host/async_resource_handler.cc b/content/browser/renderer_host/async_resource_handler.cc
index 3cfc4d3..859f9a82 100644
--- a/content/browser/renderer_host/async_resource_handler.cc
+++ b/content/browser/renderer_host/async_resource_handler.cc
@@ -97,6 +97,8 @@ AsyncResourceHandler::AsyncResourceHandler(
}
AsyncResourceHandler::~AsyncResourceHandler() {
+ // Cleanup back-pointer stored on the request info.
+ ResourceRequestInfoImpl::ForRequest(request_)->set_async_handler(NULL);
}
void AsyncResourceHandler::OnFollowRedirect(
@@ -334,11 +336,8 @@ void AsyncResourceHandler::MarkAsDeferred(bool deferred) {
ResourceRequestInfoImpl* info =
ResourceRequestInfoImpl::ForRequest(request_);
- if (deferred) {
+ if (deferred)
info->set_async_handler(this);
- } else {
- info->set_async_handler(NULL);
- }
}
void AsyncResourceHandler::ResumeIfDeferred() {