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

Unified Diff: content/child/resource_dispatcher.cc

Issue 2399463002: Clear mojo URLLoaderClient in ResourceDispatcher on cancellation (Closed)
Patch Set: Created 4 years, 2 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 aa413aeb97706540315d10f869a9a418683dffde..36626e7f8ab302f0a45ecfb64774e14343303caa 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -453,6 +453,9 @@ bool ResourceDispatcher::RemovePendingRequest(int request_id) {
ReleaseResourcesInMessageQueue(&request_info->deferred_message_queue);
+ if (it->second->url_loader_client)
+ it->second->url_loader_client = nullptr;
yhirano 2016/10/05 09:03:00 Would Calling Cancel be enough?
tzik 2016/10/06 04:14:02 As we chatted offline, URLLoaderClient (and URLLoa
yhirano 2016/10/06 06:53:05 Can you run this statement unconditionally?
tzik 2016/10/06 12:08:13 Done.
+
// Always delete the pending_request asyncly so that cancelling the request
// doesn't delete the request context info while its response is still being
// handled.
« 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