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

Unified Diff: net/url_request/url_request_redirect_job.cc

Issue 1232113002: Prevent URLRequestRedirectJob from doing async execution (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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: net/url_request/url_request_redirect_job.cc
diff --git a/net/url_request/url_request_redirect_job.cc b/net/url_request/url_request_redirect_job.cc
index b127220552e2975126e72b366cba95f49d42d33b..407473f4ae2699cbc59e675562f4c89a050dc282 100644
--- a/net/url_request/url_request_redirect_job.cc
+++ b/net/url_request/url_request_redirect_job.cc
@@ -81,6 +81,10 @@ int URLRequestRedirectJob::GetResponseCode() const {
URLRequestRedirectJob::~URLRequestRedirectJob() {}
void URLRequestRedirectJob::StartAsync() {
+ // By this moment request might be already canceled and this job killed
+ if (!request_ || !request_->status().is_success())
+ return;
mmenke 2015/07/13 21:14:17 Also, we should have a unit test for this. I don'
mmenke 2015/07/13 21:14:17 Instead of this, I think would be a little more co
alexanderk 2015/07/16 09:48:56 Well, it's kind of complicated to develop this uni
mmenke 2015/07/16 15:26:14 Thanks for catching this! This is a bug in the DC
mmenke 2015/07/16 17:58:32 Turns out this is actually a symptom of the bug yo
+
receive_headers_end_ = base::TimeTicks::Now();
response_time_ = base::Time::Now();
« 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