diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-13 08:48:28 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-13 08:48:28 +0000 |
commit | d26ff35536eb0745d5555a4c7281fb32fddcee4f (patch) | |
tree | 6a5d45b52defc6606b8c8228a60fbebf996c86e1 /net/spdy/spdy_websocket_stream.h | |
parent | dc027aadd79343b8845120d18020b217e9bf2f45 (diff) | |
download | chromium_src-d26ff35536eb0745d5555a4c7281fb32fddcee4f.zip chromium_src-d26ff35536eb0745d5555a4c7281fb32fddcee4f.tar.gz chromium_src-d26ff35536eb0745d5555a4c7281fb32fddcee4f.tar.bz2 |
[SPDY] Make sure final SpdyStream references are held by SpdySession
This will make it much easier to avoid use-after-free bugs when we
make SpdyStream not ref-counted.
Expose only WeakPtr<SpdyStream> objects outside of SpdySession
and SpdyWriteQueue.
Introduce SpdySession::DeleteStreamRefs, which takes a pointer to the last
scoped_refptr to that stream and serves as its destructor.
Fix a lot of dangling SpdyStream references in tests.
Remove SpdyStream::cancelled(), as a stream now guaranteed to be
deleted when cancelled.
Split SpdyStreamRequest::OnRequestComplete() into
OnRequestComplete{Success,Failure}().
BUG=178943
Review URL: https://chromiumcodereview.appspot.com/14812007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199688 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_websocket_stream.h')
-rw-r--r-- | net/spdy/spdy_websocket_stream.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/spdy/spdy_websocket_stream.h b/net/spdy/spdy_websocket_stream.h index 02f6c7c..a589ae0 100644 --- a/net/spdy/spdy_websocket_stream.h +++ b/net/spdy/spdy_websocket_stream.h @@ -95,7 +95,7 @@ class NET_EXPORT_PRIVATE SpdyWebSocketStream base::WeakPtrFactory<SpdyWebSocketStream> weak_ptr_factory_; SpdyStreamRequest stream_request_; - scoped_refptr<SpdyStream> stream_; + base::WeakPtr<SpdyStream> stream_; scoped_refptr<SpdySession> spdy_session_; Delegate* delegate_; |