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

Unified Diff: net/spdy/spdy_stream.cc

Issue 10829066: Fix a SPDY crash bug where a CHECK() is hit because a cancelled stream is considered active by the … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add SPDY/3 test. Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: net/spdy/spdy_stream.cc
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index f3828d63e19ab375c6b53e2e547568f627b2db33..38338470cced79fcf8d939d88c7dc8126615feee 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -87,6 +87,8 @@ class SpdyStream::SpdyStreamIOBufferProducer
}
virtual SpdyIOBuffer* ProduceNextBuffer(SpdySession* session) OVERRIDE {
+ if (stream_->cancelled())
+ return NULL;
if (stream_->stream_id() == 0)
SpdySession::SpdyIOBufferProducer::ActivateStream(session, stream_);
frame_.reset(stream_->ProduceNextFrame());
@@ -526,6 +528,10 @@ void SpdyStream::Cancel() {
cancelled_ = true;
if (session_->IsStreamActive(stream_id_))
session_->ResetStream(stream_id_, CANCEL, "");
+ else
+ session_->DeleteCreatedStream(this);
+
+ CHECK(!session_->IsStreamActive(stream_id_));
}
void SpdyStream::Close() {
« net/spdy/spdy_session_spdy2_unittest.cc ('K') | « net/spdy/spdy_session_spdy3_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698