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..1dfb56dc083cece2c6bc3b79289fa6b08f2cfd6b 100644 |
--- a/net/url_request/url_request_redirect_job.cc |
+++ b/net/url_request/url_request_redirect_job.cc |
@@ -65,6 +65,11 @@ void URLRequestRedirectJob::Start() { |
weak_factory_.GetWeakPtr())); |
} |
+void URLRequestRedirectJob::Kill() { |
+ weak_factory_.InvalidateWeakPtrs(); |
+ URLRequestJob::Kill(); |
+} |
+ |
bool URLRequestRedirectJob::CopyFragmentOnRedirect(const GURL& location) const { |
// The instantiators have full control over the desired redirection target, |
// including the reference fragment part of the URL. |
@@ -81,6 +86,9 @@ int URLRequestRedirectJob::GetResponseCode() const { |
URLRequestRedirectJob::~URLRequestRedirectJob() {} |
void URLRequestRedirectJob::StartAsync() { |
+ DCHECK(request_); |
+ DCHECK(request_->status().is_success()); |
+ |
receive_headers_end_ = base::TimeTicks::Now(); |
response_time_ = base::Time::Now(); |