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

Side by Side Diff: net/quic/quic_spdy_stream.h

Issue 1932653002: Fixes use-after-free bug in QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_spdy_session.cc ('k') | net/quic/quic_spdy_stream.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // The base class for streams which deliver data to/from an application. 5 // The base class for streams which deliver data to/from an application.
6 // In each direction, the data on such a stream first contains compressed 6 // In each direction, the data on such a stream first contains compressed
7 // headers then body data. 7 // headers then body data.
8 8
9 #ifndef NET_QUIC_QUIC_SPDY_STREAM_H_ 9 #ifndef NET_QUIC_QUIC_SPDY_STREAM_H_
10 #define NET_QUIC_QUIC_SPDY_STREAM_H_ 10 #define NET_QUIC_QUIC_SPDY_STREAM_H_
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 const SpdyHeaderBlock& received_trailers() const { 177 const SpdyHeaderBlock& received_trailers() const {
178 return received_trailers_; 178 return received_trailers_;
179 } 179 }
180 180
181 virtual SpdyPriority priority() const; 181 virtual SpdyPriority priority() const;
182 182
183 // Sets priority_ to priority. This should only be called before bytes are 183 // Sets priority_ to priority. This should only be called before bytes are
184 // written to the server. 184 // written to the server.
185 void SetPriority(SpdyPriority priority); 185 void SetPriority(SpdyPriority priority);
186 186
187 // Called when owning session is getting deleted to avoid subsequent
188 // use of the spdy_session_ member.
189 void ClearSession();
190
187 protected: 191 protected:
188 // Called by OnStreamHeadersComplete depending on which type (initial or 192 // Called by OnStreamHeadersComplete depending on which type (initial or
189 // trailing) headers are expected next. 193 // trailing) headers are expected next.
190 virtual void OnInitialHeadersComplete(bool fin, size_t frame_len); 194 virtual void OnInitialHeadersComplete(bool fin, size_t frame_len);
191 virtual void OnTrailingHeadersComplete(bool fin, size_t frame_len); 195 virtual void OnTrailingHeadersComplete(bool fin, size_t frame_len);
192 virtual void OnInitialHeadersComplete(bool fin, 196 virtual void OnInitialHeadersComplete(bool fin,
193 size_t frame_len, 197 size_t frame_len,
194 const QuicHeaderList& header_list); 198 const QuicHeaderList& header_list);
195 virtual void OnTrailingHeadersComplete(bool fin, 199 virtual void OnTrailingHeadersComplete(bool fin,
196 size_t frame_len, 200 size_t frame_len,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 std::string decompressed_trailers_; 234 std::string decompressed_trailers_;
231 // The parsed trailers received from the peer. 235 // The parsed trailers received from the peer.
232 SpdyHeaderBlock received_trailers_; 236 SpdyHeaderBlock received_trailers_;
233 237
234 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); 238 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream);
235 }; 239 };
236 240
237 } // namespace net 241 } // namespace net
238 242
239 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ 243 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/quic_spdy_session.cc ('k') | net/quic/quic_spdy_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698