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

Side by Side Diff: net/quic/chromium/bidirectional_stream_quic_impl.h

Issue 2914073002: Avoid crashing when a BidirectionalStreamQuicImpl is deleted during OnStreamReady. (Closed)
Patch Set: newline Created 3 years, 6 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 | « no previous file | net/quic/chromium/bidirectional_stream_quic_impl.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CHROMIUM_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ 5 #ifndef NET_QUIC_CHROMIUM_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_
6 #define NET_QUIC_CHROMIUM_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ 6 #define NET_QUIC_CHROMIUM_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 int64_t GetTotalSentBytes() const override; 56 int64_t GetTotalSentBytes() const override;
57 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; 57 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
58 58
59 private: 59 private:
60 // QuicChromiumClientStream::Delegate implementation: 60 // QuicChromiumClientStream::Delegate implementation:
61 void OnClose() override; 61 void OnClose() override;
62 void OnError(int error) override; 62 void OnError(int error) override;
63 63
64 void OnStreamReady(int rv); 64 void OnStreamReady(int rv);
65 void OnSendDataComplete(int rv); 65 void OnSendDataComplete(int rv);
66 void ReadInitialHeaders();
66 void OnReadInitialHeadersComplete(int rv); 67 void OnReadInitialHeadersComplete(int rv);
67 void ReadTrailingHeaders(); 68 void ReadTrailingHeaders();
68 void OnReadTrailingHeadersComplete(int rv); 69 void OnReadTrailingHeadersComplete(int rv);
69 void OnReadDataComplete(int rv); 70 void OnReadDataComplete(int rv);
70 71
71 // Notifies the delegate of an error. 72 // Notifies the delegate of an error.
72 void NotifyError(int error); 73 void NotifyError(int error);
73 // Notifies the delegate that the stream is ready. 74 // Notifies the delegate that the stream is ready.
74 void NotifyStreamReady(); 75 void NotifyStreamReady();
75 // Resets the stream and ensures that |delegate_| won't be called back. 76 // Resets the stream and ensures that |delegate_| won't be called back.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 bool send_request_headers_automatically_; 123 bool send_request_headers_automatically_;
123 124
124 base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_; 125 base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_;
125 126
126 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamQuicImpl); 127 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamQuicImpl);
127 }; 128 };
128 129
129 } // namespace net 130 } // namespace net
130 131
131 #endif // NET_QUIC_CHROMIUM_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ 132 #endif // NET_QUIC_CHROMIUM_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/chromium/bidirectional_stream_quic_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698