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

Issue 2918663002: Clean up error handling in BidirectionalStreamQuicImpl::Start (Closed)

Created:
3 years, 6 months ago by Ryan Hamilton
Modified:
3 years, 6 months ago
Reviewers:
xunjieli
CC:
chromium-reviews, cbentzel+watch_chromium.org, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Clean up error handling in BidirectionalStreamQuicImpl::Start Previously, NotifyError was called before delegate_ was assigned to which meant that the delegate was not notified of any errors. Review-Url: https://codereview.chromium.org/2918663002 Cr-Commit-Position: refs/heads/master@{#476192} Committed: https://chromium.googlesource.com/chromium/src/+/12cdf8017a99e246e8acff7c3512fbd4406cafe0

Patch Set 1 #

Total comments: 9

Patch Set 2 : Address comments #

Patch Set 3 : Fix test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -11 lines) Patch
M net/quic/chromium/bidirectional_stream_quic_impl.cc View 1 2 chunks +12 lines, -11 lines 0 comments Download
M net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc View 1 2 1 chunk +45 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 19 (11 generated)
Ryan Hamilton
https://codereview.chromium.org/2918663002/diff/1/net/quic/chromium/bidirectional_stream_quic_impl.cc File net/quic/chromium/bidirectional_stream_quic_impl.cc (left): https://codereview.chromium.org/2918663002/diff/1/net/quic/chromium/bidirectional_stream_quic_impl.cc#oldcode63 net/quic/chromium/bidirectional_stream_quic_impl.cc:63: } Since both the handle's RequestStream and the session's ...
3 years, 6 months ago (2017-05-31 21:51:59 UTC) #2
xunjieli
lgtm https://codereview.chromium.org/2918663002/diff/1/net/quic/chromium/bidirectional_stream_quic_impl.cc File net/quic/chromium/bidirectional_stream_quic_impl.cc (left): https://codereview.chromium.org/2918663002/diff/1/net/quic/chromium/bidirectional_stream_quic_impl.cc#oldcode63 net/quic/chromium/bidirectional_stream_quic_impl.cc:63: } On 2017/05/31 21:51:59, Ryan Hamilton wrote: > ...
3 years, 6 months ago (2017-05-31 23:40:13 UTC) #7
Ryan Hamilton
Thanks! Landing now... https://codereview.chromium.org/2918663002/diff/1/net/quic/chromium/bidirectional_stream_quic_impl.cc File net/quic/chromium/bidirectional_stream_quic_impl.cc (right): https://codereview.chromium.org/2918663002/diff/1/net/quic/chromium/bidirectional_stream_quic_impl.cc#newcode72 net/quic/chromium/bidirectional_stream_quic_impl.cc:72: FROM_HERE, base::Bind(&BidirectionalStreamQuicImpl::NotifyError, On 2017/05/31 23:40:12, xunjieli ...
3 years, 6 months ago (2017-06-01 02:15:36 UTC) #8
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/2918663002/40001
3 years, 6 months ago (2017-06-01 02:34:38 UTC) #11
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/228107)
3 years, 6 months ago (2017-06-01 03:56:07 UTC) #13
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/2918663002/40001
3 years, 6 months ago (2017-06-01 04:01:58 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/12cdf8017a99e246e8acff7c3512fbd4406cafe0
3 years, 6 months ago (2017-06-01 04:43:54 UTC) #18
xunjieli
3 years, 6 months ago (2017-06-01 11:57:55 UTC) #19
Message was sent while issue was closed.
https://codereview.chromium.org/2918663002/diff/1/net/quic/chromium/bidirecti...
File net/quic/chromium/bidirectional_stream_quic_impl.cc (right):

https://codereview.chromium.org/2918663002/diff/1/net/quic/chromium/bidirecti...
net/quic/chromium/bidirectional_stream_quic_impl.cc:72: FROM_HERE,
base::Bind(&BidirectionalStreamQuicImpl::NotifyError,
I thought about this some more yesterday. I think you are right.
If Start() can call NotifyError() synchronously, the BidiStream  (delegate of
BidiStreamQuicImpl) might not be expecting that OnFailed() callback being called
in Start(). If BidiStream accesses BidiStreamQuicImpl's states synchronously
after calling BidiStreamQuicImpl::Start() (right now it doesn't), we will be in
trouble.

OnStreamReady() on line 80 can call |delegate_|::OnStreamReady() synchronously
during Start(). I think that needs to be changed later on so we are consistent
about not calling into |delegate_| synchronously?

Sorry that this class is a mess!

Powered by Google App Engine
This is Rietveld 408576698