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

Unified Diff: net/url_request/url_request_simple_job.cc

Issue 1271593002: Fix cancellation of a pair of URLRequestJob subclasses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes Created 5 years, 4 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: net/url_request/url_request_simple_job.cc
diff --git a/net/url_request/url_request_simple_job.cc b/net/url_request/url_request_simple_job.cc
index 2f2fb875a2c7668f827d5e2e98436e344bd2951b..2fdbef4049ad0db86e25562b041ace700c20a0f5 100644
--- a/net/url_request/url_request_simple_job.cc
+++ b/net/url_request/url_request_simple_job.cc
@@ -48,6 +48,11 @@ void URLRequestSimpleJob::Start() {
base::Bind(&URLRequestSimpleJob::StartAsync, weak_factory_.GetWeakPtr()));
}
+void URLRequestSimpleJob::Kill() {
+ weak_factory_.InvalidateWeakPtrs();
+ URLRangeRequestJob::Kill();
+}
+
bool URLRequestSimpleJob::GetMimeType(std::string* mime_type) const {
*mime_type = mime_type_;
return true;

Powered by Google App Engine
This is Rietveld 408576698