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

Unified Diff: content/child/resource_dispatcher.cc

Issue 301753002: Revert 241291 (Fix a leak in ResourceDispatcher on cancel). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/resource_dispatcher.cc
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index 456695cfbe9c43866a7b691b72bb5b436fc0c20a..ad80be7630978d52523d1cca9f2aee341d9e8d8b 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -588,8 +588,10 @@ void ResourceDispatcher::CancelPendingRequest(int request_id) {
return;
}
- // |request_id| will be removed from |pending_requests_| when
- // OnRequestComplete returns with ERR_ABORTED.
+ PendingRequestInfo& request_info = it->second;
+ ReleaseResourcesInMessageQueue(&request_info.deferred_message_queue);
+ pending_requests_.erase(it);
+
message_sender()->Send(new ResourceHostMsg_CancelRequest(request_id));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698