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/http | |
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/http')
-rw-r--r-- | net/http/http_proxy_client_socket_pool.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc index 3c38c15..03b43ed 100644 --- a/net/http/http_proxy_client_socket_pool.cc +++ b/net/http/http_proxy_client_socket_pool.cc @@ -330,7 +330,7 @@ int HttpProxyConnectJob::DoSpdyProxyCreateStreamComplete(int result) { return result; next_state_ = STATE_HTTP_PROXY_CONNECT_COMPLETE; - scoped_refptr<SpdyStream> stream = spdy_stream_request_.ReleaseStream(); + base::WeakPtr<SpdyStream> stream = spdy_stream_request_.ReleaseStream(); DCHECK(stream); // |transport_socket_| will set itself as |stream|'s delegate. transport_socket_.reset( |