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

Side by Side Diff: net/spdy/spdy_stream.cc

Issue 210733006: Remove failing CHECK(!delegate_) from SpdyStream::OnDataReceived() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/spdy_stream.h" 5 #include "net/spdy/spdy_stream.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 } 450 }
451 451
452 void SpdyStream::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) { 452 void SpdyStream::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) {
453 DCHECK(session_->IsStreamActive(stream_id_)); 453 DCHECK(session_->IsStreamActive(stream_id_));
454 454
455 // If we're still buffering data for a push stream, we will do the 455 // If we're still buffering data for a push stream, we will do the
456 // check for data received with incomplete headers in 456 // check for data received with incomplete headers in
457 // PushedStreamReplayData(). 457 // PushedStreamReplayData().
458 if (io_state_ == STATE_HALF_CLOSED_LOCAL_UNCLAIMED) { 458 if (io_state_ == STATE_HALF_CLOSED_LOCAL_UNCLAIMED) {
459 DCHECK_EQ(type_, SPDY_PUSH_STREAM); 459 DCHECK_EQ(type_, SPDY_PUSH_STREAM);
460 CHECK(!delegate_);
461 // It should be valid for this to happen in the server push case. 460 // It should be valid for this to happen in the server push case.
462 // We'll return received data when delegate gets attached to the stream. 461 // We'll return received data when delegate gets attached to the stream.
463 if (buffer) { 462 if (buffer) {
464 pending_recv_data_.push_back(buffer.release()); 463 pending_recv_data_.push_back(buffer.release());
465 } else { 464 } else {
466 pending_recv_data_.push_back(NULL); 465 pending_recv_data_.push_back(NULL);
467 metrics_.StopStream(); 466 metrics_.StopStream();
468 // Note: we leave the stream open in the session until the stream 467 // Note: we leave the stream open in the session until the stream
469 // is claimed. 468 // is claimed.
470 } 469 }
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, 885 description = base::StringPrintf("Unknown state 0x%08X (%u)", state,
887 state); 886 state);
888 break; 887 break;
889 } 888 }
890 return description; 889 return description;
891 } 890 }
892 891
893 #undef STATE_CASE 892 #undef STATE_CASE
894 893
895 } // namespace net 894 } // namespace net
OLDNEW
« 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