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

Issue 1774703003: QuicChromiumClientStream should only do OnStream after notifying delegate about trailers (Closed)

Created:
4 years, 9 months ago by xunjieli
Modified:
4 years, 9 months ago
Reviewers:
Ryan Hamilton
CC:
chromium-reviews, cbentzel+watch_chromium.org, rjshade
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

QuicChromiumClientStream should only do OnStream after notifying delegate about trailers OnStream with a FIN flag indirectly calls delegate_->OnDataAvailable to force delegate to read FIN through QuicStreamSequencer::MaybeCloseStream. However this is not desirable, since delegate will receive OnDataAvailable callback before OnHeadersReceived (for trailers), which can led to delegate missing the trailers received event. Therefore, we should only force delegate to read FIN only after delegate is notified of trailers. BUG=586207

Patch Set 1 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -9 lines) Patch
M net/quic/quic_chromium_client_stream.cc View 1 chunk +5 lines, -3 lines 0 comments Download
M net/quic/quic_chromium_client_stream_test.cc View 2 chunks +11 lines, -0 lines 0 comments Download
M net/quic/quic_http_stream.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M net/quic/quic_spdy_stream.cc View 1 chunk +0 lines, -1 line 2 comments Download

Dependent Patchsets:

Messages

Total messages: 12 (8 generated)
xunjieli
Ryan, PTAL. My previous CL isn't quite right. I didn't realize that OnStream with a ...
4 years, 9 months ago (2016-03-08 03:13:20 UTC) #9
Ryan Hamilton
https://codereview.chromium.org/1774703003/diff/20001/net/quic/quic_spdy_stream.cc File net/quic/quic_spdy_stream.cc (left): https://codereview.chromium.org/1774703003/diff/20001/net/quic/quic_spdy_stream.cc#oldcode216 net/quic/quic_spdy_stream.cc:216: OnStreamFrame(QuicStreamFrame(id(), fin, stream_bytes_read(), StringPiece())); I thought that you and ...
4 years, 9 months ago (2016-03-08 04:12:43 UTC) #10
xunjieli
Thanks, PTAL https://codereview.chromium.org/1774703003/diff/20001/net/quic/quic_spdy_stream.cc File net/quic/quic_spdy_stream.cc (left): https://codereview.chromium.org/1774703003/diff/20001/net/quic/quic_spdy_stream.cc#oldcode216 net/quic/quic_spdy_stream.cc:216: OnStreamFrame(QuicStreamFrame(id(), fin, stream_bytes_read(), StringPiece())); On 2016/03/08 04:12:43, ...
4 years, 9 months ago (2016-03-08 14:46:02 UTC) #11
xunjieli
4 years, 9 months ago (2016-03-09 20:40:06 UTC) #12
I found a less invasive way to achieve this by simply delaying
MarkTrailersConsumed until we are about to notify delegate not when the task is
posted. Closing this CL now.

Powered by Google App Engine
This is Rietveld 408576698