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

Side by Side Diff: net/quic/core/quic_stream_sequencer_buffer.h

Issue 2519333006: Add CHECK's to debug QuicStreamSequencerBuffer in weird state. Add a destruction indicator to detec… (Closed)
Patch Set: using CHECK_GT Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/quic/core/quic_stream_sequencer_buffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_QUIC_QUIC_STREAM_SEQUENCER_BUFFER_H_ 5 #ifndef NET_QUIC_QUIC_STREAM_SEQUENCER_BUFFER_H_
6 #define NET_QUIC_QUIC_STREAM_SEQUENCER_BUFFER_H_ 6 #define NET_QUIC_QUIC_STREAM_SEQUENCER_BUFFER_H_
7 7
8 // QuicStreamSequencerBuffer implements QuicStreamSequencerBufferInterface. 8 // QuicStreamSequencerBuffer implements QuicStreamSequencerBufferInterface.
9 // It is a circular stream buffer with random write and 9 // It is a circular stream buffer with random write and
10 // in-sequence read. It consists of a vector of pointers pointing 10 // in-sequence read. It consists of a vector of pointers pointing
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // such that the number of blocks never exceeds blocks_count_. 241 // such that the number of blocks never exceeds blocks_count_.
242 // Each list entry can hold up to kBlockSizeBytes bytes. 242 // Each list entry can hold up to kBlockSizeBytes bytes.
243 std::unique_ptr<BufferBlock* []> blocks_; 243 std::unique_ptr<BufferBlock* []> blocks_;
244 244
245 // Number of bytes in buffer. 245 // Number of bytes in buffer.
246 size_t num_bytes_buffered_; 246 size_t num_bytes_buffered_;
247 247
248 // Stores all the buffered frames' start offset, length and arrival time. 248 // Stores all the buffered frames' start offset, length and arrival time.
249 std::map<QuicStreamOffset, FrameInfo> frame_arrival_time_map_; 249 std::map<QuicStreamOffset, FrameInfo> frame_arrival_time_map_;
250 250
251 // For debugging use after free, assigned to 123456 in constructor and 654321
252 // in destructor. As long as it's not 123456, this means either use after free
253 // or memory corruption.
254 int32_t destruction_indicator_;
255
251 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencerBuffer); 256 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencerBuffer);
252 }; 257 };
253 } // namespace net 258 } // namespace net
254 259
255 #endif // NET_QUIC_QUIC_STREAM_SEQUENCER_BUFFER_H_ 260 #endif // NET_QUIC_QUIC_STREAM_SEQUENCER_BUFFER_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/core/quic_stream_sequencer_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698