Chromium Code Reviews| Index: net/http/http_stream_factory_impl_job_controller.cc |
| diff --git a/net/http/http_stream_factory_impl_job_controller.cc b/net/http/http_stream_factory_impl_job_controller.cc |
| index c72fd3db7148254fa21964d411d9c5f363b138f9..34b76a77b6f46eebe008ecae06520804fa31c9cb 100644 |
| --- a/net/http/http_stream_factory_impl_job_controller.cc |
| +++ b/net/http/http_stream_factory_impl_job_controller.cc |
| @@ -152,13 +152,6 @@ void HttpStreamFactoryImpl::JobController::OnRequestComplete() { |
| } else { |
| DCHECK(bound_job_->job_type() == ALTERNATIVE); |
| alternative_job_.reset(); |
| - // If ResumeMainJob() is not executed, reset |main_job_|. Otherwise, |
| - // OnOrphanedJobComplete() will clean up |this| when the job completes. |
| - // Use |main_job_is_blocked_| and |!main_job_wait_time_.is_zero()| instead |
| - // of |main_job_|->is_waiting() because |main_job_| can be in proxy |
| - // resolution step. |
| - if (main_job_ && (main_job_is_blocked_ || !main_job_wait_time_.is_zero())) |
| - main_job_.reset(); |
| } |
| bound_job_ = nullptr; |
| } |
| @@ -743,7 +736,16 @@ void HttpStreamFactoryImpl::JobController::OrphanUnboundJob() { |
| } else if (bound_job_->job_type() == ALTERNATIVE && main_job_) { |
| // Orphan main job. |
| factory_->request_map_.erase(main_job_.get()); |
| - main_job_->Orphan(); |
| + // If ResumeMainJob() is not executed, reset |main_job_|. Otherwise, |
| + // OnOrphanedJobComplete() will clean up |this| when the job completes. |
| + // Use |main_job_is_blocked_| and |!main_job_wait_time_.is_zero()| instead |
| + // of |main_job_|->is_waiting() because |main_job_| can be in proxy |
| + // resolution step. |
| + if (main_job_ && (main_job_is_blocked_ || !main_job_wait_time_.is_zero())) { |
|
mmenke
2017/01/12 22:46:48
DCHECK(alternative_job_)? (If alternate_job_ is r
Zhongyi Shi
2017/01/12 23:17:50
Done.
bound_job_ will only be reset to nullptr whe
|
| + main_job_.reset(); |
| + } else { |
| + main_job_->Orphan(); |
|
xunjieli
2017/01/12 23:00:32
Should HttpStreamFactoryImpl::Job::Orphan() also c
xunjieli
2017/01/12 23:04:30
Think that the old code calls OnOrphanedJobComplet
Zhongyi Shi
2017/01/12 23:17:50
For non-websockets case, the Job will continue con
|
| + } |
| } |
| } |