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

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: 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
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 use after free.
Ryan Hamilton 2016/11/23 20:42:40 Either use after free, or memory corruption.
danzh1 2016/11/23 21:39:24 Done.
253 int32_t destruction_indicator_;
254
251 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencerBuffer); 255 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencerBuffer);
252 }; 256 };
253 } // namespace net 257 } // namespace net
254 258
255 #endif // NET_QUIC_QUIC_STREAM_SEQUENCER_BUFFER_H_ 259 #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') | net/quic/core/quic_stream_sequencer_buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698