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

Side by Side Diff: net/spdy/bidirectional_stream_spdy_impl.h

Issue 2032733002: Do not crash on null stream in writing to bidirectional streams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_crash
Patch Set: Address Andrei's comments Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 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_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ 5 #ifndef NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_
6 #define NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ 6 #define NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 SpdyResponseHeadersStatus OnResponseHeadersUpdated( 63 SpdyResponseHeadersStatus OnResponseHeadersUpdated(
64 const SpdyHeaderBlock& response_headers) override; 64 const SpdyHeaderBlock& response_headers) override;
65 void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override; 65 void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override;
66 void OnDataSent() override; 66 void OnDataSent() override;
67 void OnTrailers(const SpdyHeaderBlock& trailers) override; 67 void OnTrailers(const SpdyHeaderBlock& trailers) override;
68 void OnClose(int status) override; 68 void OnClose(int status) override;
69 69
70 private: 70 private:
71 int SendRequestHeadersHelper(); 71 int SendRequestHeadersHelper();
72 void OnStreamInitialized(int rv); 72 void OnStreamInitialized(int rv);
73 // Notifies delegate of an error.
74 void NotifyError(int rv);
73 void ScheduleBufferedRead(); 75 void ScheduleBufferedRead();
74 void DoBufferedRead(); 76 void DoBufferedRead();
75 bool ShouldWaitForMoreBufferedData() const; 77 bool ShouldWaitForMoreBufferedData() const;
76 78
77 const base::WeakPtr<SpdySession> spdy_session_; 79 const base::WeakPtr<SpdySession> spdy_session_;
78 const BidirectionalStreamRequestInfo* request_info_; 80 const BidirectionalStreamRequestInfo* request_info_;
79 BidirectionalStreamImpl::Delegate* delegate_; 81 BidirectionalStreamImpl::Delegate* delegate_;
80 std::unique_ptr<base::Timer> timer_; 82 std::unique_ptr<base::Timer> timer_;
81 SpdyStreamRequest stream_request_; 83 SpdyStreamRequest stream_request_;
82 base::WeakPtr<SpdyStream> stream_; 84 base::WeakPtr<SpdyStream> stream_;
(...skipping 23 matching lines...) Expand all
106 scoped_refptr<IOBuffer> pending_combined_buffer_; 108 scoped_refptr<IOBuffer> pending_combined_buffer_;
107 109
108 base::WeakPtrFactory<BidirectionalStreamSpdyImpl> weak_factory_; 110 base::WeakPtrFactory<BidirectionalStreamSpdyImpl> weak_factory_;
109 111
110 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamSpdyImpl); 112 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamSpdyImpl);
111 }; 113 };
112 114
113 } // namespace net 115 } // namespace net
114 116
115 #endif // NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ 117 #endif // NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698