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

Unified Diff: net/spdy/spdy_session.cc

Issue 10267021: Change a DCHECK into a CHECK in SpdySession::WriteStreamData to ensure that we're not attempting to… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 7c7e4264904a018902963873b4795d92efdf3c63..aa889bc94ad9a0bf58ed3e2735a2a0a4c33d5611 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -752,10 +752,8 @@ int SpdySession::WriteStreamData(SpdyStreamId stream_id,
net::IOBuffer* data, int len,
SpdyDataFlags flags) {
// Find our stream
- DCHECK(IsStreamActive(stream_id));
+ CHECK(IsStreamActive(stream_id));
scoped_refptr<SpdyStream> stream = active_streams_[stream_id];
- if (!stream)
- return ERR_INVALID_SPDY_STREAM;
CHECK_EQ(stream->stream_id(), stream_id);
if (len > kMaxSpdyFrameChunkSize) {
@@ -1508,8 +1506,7 @@ void SpdySession::OnSynReply(const SpdySynReplyControlFrame& frame,
stream_id, 0)));
}
- bool valid_stream = IsStreamActive(stream_id);
- if (!valid_stream) {
+ if (!IsStreamActive(stream_id)) {
// NOTE: it may just be that the stream was cancelled.
LOG(WARNING) << "Received SYN_REPLY for invalid stream " << stream_id;
return;
@@ -1543,8 +1540,7 @@ void SpdySession::OnHeaders(const SpdyHeadersControlFrame& frame,
stream_id, 0)));
}
- bool valid_stream = IsStreamActive(stream_id);
- if (!valid_stream) {
+ if (!IsStreamActive(stream_id)) {
// NOTE: it may just be that the stream was cancelled.
LOG(WARNING) << "Received HEADERS for invalid stream " << stream_id;
return;
@@ -1570,8 +1566,7 @@ void SpdySession::OnRstStream(const SpdyRstStreamControlFrame& frame) {
make_scoped_refptr(
new NetLogSpdyRstParameter(stream_id, frame.status(), "")));
- bool valid_stream = IsStreamActive(stream_id);
- if (!valid_stream) {
+ if (!IsStreamActive(stream_id)) {
// NOTE: it may just be that the stream was cancelled.
LOG(WARNING) << "Received RST for invalid stream" << stream_id;
return;
@@ -1679,7 +1674,7 @@ void SpdySession::OnWindowUpdate(
void SpdySession::SendWindowUpdate(SpdyStreamId stream_id,
int32 delta_window_size) {
- DCHECK(IsStreamActive(stream_id));
+ CHECK(IsStreamActive(stream_id));
scoped_refptr<SpdyStream> stream = active_streams_[stream_id];
CHECK_EQ(stream->stream_id(), stream_id);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698