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

Unified Diff: content/child/resource_dispatcher.cc

Issue 2303733004: Eliminate spurious request cancelations (Closed)
Patch Set: Fixed dispatcher unit test Created 4 years, 3 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
Index: content/child/resource_dispatcher.cc
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index 3105e9c2acdb970701b32c426104e0dcd864f728..38a98f84b98dff319dbb9479c81808ccc9281171 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -489,9 +489,10 @@ void ResourceDispatcher::Cancel(int request_id) {
should_dump = false;
}
}
- // Cancel the request, and clean it up so the bridge will receive no more
- // messages.
- message_sender_->Send(new ResourceHostMsg_CancelRequest(request_id));
+ // Cancel the request if it didn't complete, and clean it up so the bridge
+ // will receive no more messages.
+ if (info.completion_time.is_null())
+ message_sender_->Send(new ResourceHostMsg_CancelRequest(request_id));
RemovePendingRequest(request_id);
}
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/child/resource_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698