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 fcb617fb61d9d79d912ccf846b76e153c4b9fdd2..63f386f78071693c4836164fb6bc0753da7d9c98 100644 |
--- a/net/quic/core/quic_stream_sequencer_buffer.cc |
+++ b/net/quic/core/quic_stream_sequencer_buffer.cc |
@@ -80,7 +80,7 @@ void QuicStreamSequencerBuffer::Clear() { |
} |
bool QuicStreamSequencerBuffer::RetireBlock(size_t idx) { |
- if (FLAGS_quic_stream_sequencer_buffer_debug && blocks_[idx] == nullptr) { |
+ if (blocks_[idx] == nullptr) { |
QUIC_BUG << "Try to retire block twice"; |
return false; |
} |
@@ -188,8 +188,7 @@ QuicErrorCode QuicStreamSequencerBuffer::OnStreamData( |
} |
} |
- if (FLAGS_quic_stream_sequencer_buffer_debug && |
- write_block_num >= blocks_count_) { |
+ if (write_block_num >= blocks_count_) { |
*error_details = StringPrintf( |
"QuicStreamSequencerBuffer error: OnStreamData() exceed array bounds." |
"write offset = %" PRIu64 " write_block_num = %" PRIuS |
@@ -212,8 +211,7 @@ QuicErrorCode QuicStreamSequencerBuffer::OnStreamData( |
char* dest = blocks_[write_block_num]->buffer + write_block_offset; |
DVLOG(1) << "Write at offset: " << offset << " length: " << bytes_to_copy; |
- if (FLAGS_quic_stream_sequencer_buffer_debug && |
- (dest == nullptr || source == nullptr)) { |
+ if (dest == nullptr || source == nullptr) { |
*error_details = StringPrintf( |
"QuicStreamSequencerBuffer error: OnStreamData()" |
" dest == nullptr: %s" |
@@ -292,8 +290,7 @@ QuicErrorCode QuicStreamSequencerBuffer::Readv(const iovec* dest_iov, |
size_t bytes_to_copy = |
min<size_t>(bytes_available_in_block, dest_remaining); |
DCHECK_GT(bytes_to_copy, 0UL); |
- if (FLAGS_quic_stream_sequencer_buffer_debug && |
- (blocks_[block_idx] == nullptr || dest == nullptr)) { |
+ if (blocks_[block_idx] == nullptr || dest == nullptr) { |
*error_details = StringPrintf( |
"QuicStreamSequencerBuffer error:" |
" Readv() dest == nullptr: %s" |
@@ -316,7 +313,7 @@ QuicErrorCode QuicStreamSequencerBuffer::Readv(const iovec* dest_iov, |
// immediately. |
if (bytes_to_copy == bytes_available_in_block) { |
bool retire_successfully = RetireBlockIfEmpty(block_idx); |
- if (FLAGS_quic_stream_sequencer_buffer_debug && !retire_successfully) { |
+ if (!retire_successfully) { |
*error_details = StringPrintf( |
"QuicStreamSequencerBuffer error: fail to retire block %" PRIuS |
" as the block is already released + total_bytes_read_ = %" PRIu64 |
@@ -592,16 +589,9 @@ string QuicStreamSequencerBuffer::ReceivedFramesDebugString() { |
QuicStreamOffset current_frame_begin_offset = it.first; |
QuicStreamOffset current_frame_end_offset = |
it.second.length + current_frame_begin_offset; |
- if (FLAGS_quic_stream_sequencer_buffer_debug) { |
- current_frames_string = string(StringPrintf( |
- "%s[%" PRIu64 ", %" PRIu64 ") receiving time %" PRId64 " ", |
- current_frames_string.c_str(), current_frame_begin_offset, |
- current_frame_end_offset, it.second.timestamp.ToDebuggingValue())); |
- } else { |
- current_frames_string = string(StringPrintf( |
- "%s[%" PRIu64 ", %" PRIu64 ") ", current_frames_string.c_str(), |
- current_frame_begin_offset, current_frame_end_offset)); |
- } |
+ current_frames_string = string(StringPrintf( |
+ "%s[%" PRIu64 ", %" PRIu64 ") ", current_frames_string.c_str(), |
+ current_frame_begin_offset, current_frame_end_offset)); |
} |
return current_frames_string; |
} |