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

Unified Diff: net/quic/core/quic_stream_sequencer_buffer.cc

Issue 2205923002: Fix to make sure QuicStreamSequencerBuffer release memory in time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/core/quic_flags.cc ('k') | net/quic/core/quic_stream_sequencer_buffer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_stream_sequencer_buffer.cc
diff --git a/net/quic/core/quic_stream_sequencer_buffer.cc b/net/quic/core/quic_stream_sequencer_buffer.cc
index 05d1da1fe117070e854709f7ddb827025d055dbc..99cf5940394eac413c0f4fc61c0f65cc11867b01 100644
--- a/net/quic/core/quic_stream_sequencer_buffer.cc
+++ b/net/quic/core/quic_stream_sequencer_buffer.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "net/quic/core/quic_bug_tracker.h"
+#include "net/quic/core/quic_flags.h"
using std::min;
using std::string;
@@ -431,10 +432,12 @@ void QuicStreamSequencerBuffer::RetireBlockIfEmpty(size_t block_index) {
// Check where the next piece data is.
// Not empty if next piece of data is still in this chunk.
bool gap_extends_to_infinity =
- (first_gap.end_offset != std::numeric_limits<QuicStreamOffset>::max());
+ (first_gap.end_offset == std::numeric_limits<QuicStreamOffset>::max());
bool gap_ends_in_this_block =
(GetBlockIndex(first_gap.end_offset) == block_index);
- if (gap_extends_to_infinity || gap_ends_in_this_block) {
+ if ((!FLAGS_quic_sequencer_buffer_retire_block_in_time &&
+ !gap_extends_to_infinity) ||
+ gap_ends_in_this_block) {
return;
}
}
« no previous file with comments | « net/quic/core/quic_flags.cc ('k') | net/quic/core/quic_stream_sequencer_buffer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698