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

Issue 2625133006: Move the logic to cancel main job in OrphanUnboundJob when the alt job succeed while main job is bl… (Closed)

Created:
3 years, 11 months ago by Zhongyi Shi
Modified:
3 years, 11 months ago
Reviewers:
mmenke, xunjieli
CC:
chromium-reviews, cbentzel+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move the logic to cancel main job in OrphanUnboundJob when the alt job succeed while main job is blocked. When the alt job succeeds while the main job hasn't, the alt job will be bound the request by HttpStreamFactoryImpl::JobController::BindJob(). And JobController will orphan the main job. If the main job - is still blocked(i.e, not started yet), it should be cancelled immediately. - is no longer blocked - but is for websocket, it should be cancelled immediately. - and is not for websocket, no-op. The job will continue connecting until it finishes. When it's finishing, it will call one of the callbacks and notifying the JobController of the Job's completion. The JobController will then check whether this job has been orphaned, and calls OnOrphanedJobComplete to delete the main job. BUG=678768 Review-Url: https://codereview.chromium.org/2625133006 Cr-Commit-Position: refs/heads/master@{#444090} Committed: https://chromium.googlesource.com/chromium/src/+/910b9b9050f70a0a8602a8cfcb0ac45b9bcdd723

Patch Set 1 #

Total comments: 5

Patch Set 2 : add a DCHECK #

Patch Set 3 : fix test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -12 lines) Patch
M net/http/http_stream_factory_impl_job_controller.cc View 1 2 chunks +11 lines, -8 lines 0 comments Download
M net/http/http_stream_factory_impl_job_controller_unittest.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 30 (16 generated)
Zhongyi Shi
Helen and Matt, I moved the logic up to OrphanUnboundJob so that we delete the ...
3 years, 11 months ago (2017-01-12 22:41:23 UTC) #3
mmenke
https://codereview.chromium.org/2625133006/diff/1/net/http/http_stream_factory_impl_job_controller.cc File net/http/http_stream_factory_impl_job_controller.cc (right): https://codereview.chromium.org/2625133006/diff/1/net/http/http_stream_factory_impl_job_controller.cc#newcode744 net/http/http_stream_factory_impl_job_controller.cc:744: if (main_job_ && (main_job_is_blocked_ || !main_job_wait_time_.is_zero())) { DCHECK(alternative_job_)? (If ...
3 years, 11 months ago (2017-01-12 22:46:48 UTC) #4
xunjieli
https://codereview.chromium.org/2625133006/diff/1/net/http/http_stream_factory_impl_job_controller.cc File net/http/http_stream_factory_impl_job_controller.cc (right): https://codereview.chromium.org/2625133006/diff/1/net/http/http_stream_factory_impl_job_controller.cc#newcode747 net/http/http_stream_factory_impl_job_controller.cc:747: main_job_->Orphan(); Should HttpStreamFactoryImpl::Job::Orphan() also call OnOrphanedJobComplete() in the non-websockets ...
3 years, 11 months ago (2017-01-12 23:00:33 UTC) #5
xunjieli
https://codereview.chromium.org/2625133006/diff/1/net/http/http_stream_factory_impl_job_controller.cc File net/http/http_stream_factory_impl_job_controller.cc (right): https://codereview.chromium.org/2625133006/diff/1/net/http/http_stream_factory_impl_job_controller.cc#newcode747 net/http/http_stream_factory_impl_job_controller.cc:747: main_job_->Orphan(); On 2017/01/12 23:00:32, xunjieli wrote: > Should HttpStreamFactoryImpl::Job::Orphan() ...
3 years, 11 months ago (2017-01-12 23:04:30 UTC) #6
Zhongyi Shi
https://codereview.chromium.org/2625133006/diff/1/net/http/http_stream_factory_impl_job_controller.cc File net/http/http_stream_factory_impl_job_controller.cc (right): https://codereview.chromium.org/2625133006/diff/1/net/http/http_stream_factory_impl_job_controller.cc#newcode744 net/http/http_stream_factory_impl_job_controller.cc:744: if (main_job_ && (main_job_is_blocked_ || !main_job_wait_time_.is_zero())) { On 2017/01/12 ...
3 years, 11 months ago (2017-01-12 23:17:50 UTC) #7
xunjieli
lgtm. It will be nice if the CL description can mention why the logic is ...
3 years, 11 months ago (2017-01-13 15:29:59 UTC) #8
Zhongyi Shi
Thanks for help reviewing. I have just updated the CL description. PTAL! Matt, mind taking ...
3 years, 11 months ago (2017-01-13 20:03:35 UTC) #16
mmenke
On 2017/01/13 20:03:35, Zhongyi Shi wrote: > Thanks for help reviewing. I have just updated ...
3 years, 11 months ago (2017-01-13 20:06:57 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2625133006/20001
3 years, 11 months ago (2017-01-13 20:09:10 UTC) #19
xunjieli
For future reference, it is encouraged to have either 80 column width or 72 column ...
3 years, 11 months ago (2017-01-13 20:24:26 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/137145)
3 years, 11 months ago (2017-01-13 20:43:06 UTC) #22
xunjieli
very sorry about the delay! Test LGTM
3 years, 11 months ago (2017-01-17 14:32:16 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2625133006/60001
3 years, 11 months ago (2017-01-17 17:02:07 UTC) #27
commit-bot: I haz the power
3 years, 11 months ago (2017-01-17 17:56:27 UTC) #30
Message was sent while issue was closed.
Committed patchset #3 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/910b9b9050f70a0a8602a8cfcb0a...

Powered by Google App Engine
This is Rietveld 408576698