diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-17 01:31:54 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-17 01:31:54 +0000 |
commit | e372f959ec1b63f2ffd210ae6127d2207fd7e7d7 (patch) | |
tree | 0673a22cb8d16c06dfdd09789f1755c275475ada /net | |
parent | ae2e1303a7094acb25fb8fd234bad8e9e3d36041 (diff) | |
download | chromium_src-e372f959ec1b63f2ffd210ae6127d2207fd7e7d7.zip chromium_src-e372f959ec1b63f2ffd210ae6127d2207fd7e7d7.tar.gz chromium_src-e372f959ec1b63f2ffd210ae6127d2207fd7e7d7.tar.bz2 |
[SPDY] Add checks to track down invalid SpdyStreamRequest pointers
The crash dumps in the bug below point to a SpdyStreamRequest
pointer being invalid, although it's not obvious when
that happens. Hopefully these checks give further clues.
BUG=250841
R=rtenneti@chromium.org
Review URL: https://codereview.chromium.org/19482002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211895 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/spdy/spdy_session.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc index 879d645..e76d525 100644 --- a/net/spdy/spdy_session.cc +++ b/net/spdy/spdy_session.cc @@ -567,6 +567,8 @@ int SpdySession::GetPushStream( int SpdySession::TryCreateStream(SpdyStreamRequest* request, base::WeakPtr<SpdyStream>* stream) { + CHECK(request); + // TODO(akalin): Also refuse to create the stream when // |availability_state_| == STATE_GOING_AWAY. if (availability_state_ == STATE_CLOSED) @@ -637,6 +639,8 @@ int SpdySession::CreateStream(const SpdyStreamRequest& request, } void SpdySession::CancelStreamRequest(SpdyStreamRequest* request) { + CHECK(request); + if (DCHECK_IS_ON()) { // |request| should not be in a queue not matching its priority. for (int i = 0; i < NUM_PRIORITIES; ++i) { @@ -675,6 +679,7 @@ void SpdySession::ProcessPendingStreamRequests() { if (!pending_create_stream_queues_[i].empty()) { SpdyStreamRequest* pending_request = pending_create_stream_queues_[i].front(); + CHECK(pending_request); pending_create_stream_queues_[i].pop_front(); no_pending_create_streams = false; DCHECK(!ContainsKey(pending_stream_request_completions_, @@ -1312,6 +1317,7 @@ void SpdySession::CloseAllStreamsAfter(SpdyStreamId last_good_stream_id, queue.swap(pending_create_stream_queues_[i]); for (PendingStreamRequestQueue::const_iterator it = queue.begin(); it != queue.end(); ++it) { + CHECK(*it); (*it)->OnRequestCompleteFailure(ERR_ABORTED); } } @@ -2467,6 +2473,8 @@ void SpdySession::RecordHistograms() { } void SpdySession::CompleteStreamRequest(SpdyStreamRequest* pending_request) { + CHECK(pending_request); + PendingStreamRequestCompletionSet::iterator it = pending_stream_request_completions_.find(pending_request); |