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

Unified Diff: net/quic/quic_stream_sequencer.cc

Issue 908493004: Landing Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix valgrind error Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_stream_sequencer.h ('k') | net/quic/quic_stream_sequencer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_sequencer.cc
diff --git a/net/quic/quic_stream_sequencer.cc b/net/quic/quic_stream_sequencer.cc
index ceeaa943a4898c3c2b08f85f8ba9fa141cb1b0fe..7a9ae0dba981695af198077e5487e259851b0d87 100644
--- a/net/quic/quic_stream_sequencer.cc
+++ b/net/quic/quic_stream_sequencer.cc
@@ -25,7 +25,8 @@ QuicStreamSequencer::QuicStreamSequencer(ReliableQuicStream* quic_stream)
blocked_(false),
num_bytes_buffered_(0),
num_frames_received_(0),
- num_duplicate_frames_received_(0) {
+ num_duplicate_frames_received_(0),
+ num_early_frames_received_(0) {
}
QuicStreamSequencer::~QuicStreamSequencer() {
@@ -64,6 +65,10 @@ void QuicStreamSequencer::OnStreamFrame(const QuicStreamFrame& frame) {
IOVector data;
data.AppendIovec(frame.data.iovec(), frame.data.Size());
+ if (byte_offset > num_bytes_consumed_) {
+ ++num_early_frames_received_;
+ }
+
// If the frame has arrived in-order then we can process it immediately, only
// buffering if the stream is unable to process it.
if (!blocked_ && byte_offset == num_bytes_consumed_) {
« no previous file with comments | « net/quic/quic_stream_sequencer.h ('k') | net/quic/quic_stream_sequencer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698