DescriptionChange WeakPtr<SpdyStream> to raw pointer in SpdyHttpStream.
This allows for more explicit expression of lifetime expectations.
SpdyStream instances are created in SpdySession::CreateStream() and in
SpdySession::TryCreatePushStream(), and are owned by SpdySession in its
|created_streams_| and |active_streams_| members. They are destroyed in
SpdySession::CloseActiveStreamIterator() and in
SpdySession::CloseCreatedStreamIterator(),
and SpdySession::DeleteStream() is always called by these methods.
This always calls SpdyStream::OnClose() before deleting the stream,
which in turn calls SpdyStream::Delegate::OnClose().
Every time SpdyHttpStream grabs a handle of a SpdyStream, it immediately
registers itself as a delegate. That means that every time a SpdyStream
instance is destroyed, if a SpdyHttpStream instance has a handle of it,
it will get notified. That is, SpdyHttpStream does not actually need to
keep a WeakPtr<SpdyStream>: a raw pointer suffices.
Review-Url: https://codereview.chromium.org/2642133002
Cr-Commit-Position: refs/heads/master@{#445302}
Committed: https://chromium.googlesource.com/chromium/src/+/4e6e774857ae99aa9dc13287e0c36c1e69bf92b6
Patch Set 1 #
Total comments: 5
Patch Set 2 : Nits. #
Messages
Total messages: 19 (10 generated)
|