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

Unified Diff: net/url_request/url_request_error_job.cc

Issue 1395643003: Fix two URLRequestJob subclasses that didn't support cancellation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add OWNERS Created 5 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 | « net/url_request/url_request_error_job.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_error_job.cc
diff --git a/net/url_request/url_request_error_job.cc b/net/url_request/url_request_error_job.cc
index efbf4247d3122c86ec88ee450f5f51a1a418c11b..c2a75c1eff2c2961852d618591eb829297ece47f 100644
--- a/net/url_request/url_request_error_job.cc
+++ b/net/url_request/url_request_error_job.cc
@@ -28,6 +28,11 @@ void URLRequestErrorJob::Start() {
base::Bind(&URLRequestErrorJob::StartAsync, weak_factory_.GetWeakPtr()));
}
+void URLRequestErrorJob::Kill() {
+ weak_factory_.InvalidateWeakPtrs();
+ URLRequestJob::Kill();
+}
+
void URLRequestErrorJob::StartAsync() {
NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, error_));
}
« no previous file with comments | « net/url_request/url_request_error_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698