Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_session.h" | 5 #include "net/spdy/spdy_session.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 2685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2696 // In spdy4/http2 PUSH_PROMISE arrives on associated stream. | 2696 // In spdy4/http2 PUSH_PROMISE arrives on associated stream. |
| 2697 if (associated_it != active_streams_.end() && GetProtocolVersion() >= SPDY4) { | 2697 if (associated_it != active_streams_.end() && GetProtocolVersion() >= SPDY4) { |
| 2698 associated_it->second.stream->IncrementRawReceivedBytes( | 2698 associated_it->second.stream->IncrementRawReceivedBytes( |
| 2699 last_compressed_frame_len_); | 2699 last_compressed_frame_len_); |
| 2700 } else { | 2700 } else { |
| 2701 stream->IncrementRawReceivedBytes(last_compressed_frame_len_); | 2701 stream->IncrementRawReceivedBytes(last_compressed_frame_len_); |
| 2702 } | 2702 } |
| 2703 | 2703 |
| 2704 last_compressed_frame_len_ = 0; | 2704 last_compressed_frame_len_ = 0; |
| 2705 | 2705 |
| 2706 DeleteExpiredPushedStreams(); | |
|
szym
2014/12/18 06:34:38
This is definitely a bug and the solution makes se
Ryan Hamilton
2015/01/07 19:32:14
+1 for a test.
| |
| 2707 PushedStreamMap::iterator inserted_pushed_it = | 2706 PushedStreamMap::iterator inserted_pushed_it = |
| 2708 unclaimed_pushed_streams_.insert( | 2707 unclaimed_pushed_streams_.insert( |
| 2709 pushed_it, | 2708 pushed_it, |
| 2710 std::make_pair(gurl, PushedStreamInfo(stream_id, time_func_()))); | 2709 std::make_pair(gurl, PushedStreamInfo(stream_id, time_func_()))); |
| 2711 DCHECK(inserted_pushed_it != pushed_it); | 2710 DCHECK(inserted_pushed_it != pushed_it); |
| 2711 DeleteExpiredPushedStreams(); | |
| 2712 | 2712 |
| 2713 InsertActivatedStream(stream.Pass()); | 2713 InsertActivatedStream(stream.Pass()); |
| 2714 | 2714 |
| 2715 ActiveStreamMap::iterator active_it = active_streams_.find(stream_id); | 2715 ActiveStreamMap::iterator active_it = active_streams_.find(stream_id); |
| 2716 if (active_it == active_streams_.end()) { | 2716 if (active_it == active_streams_.end()) { |
| 2717 NOTREACHED(); | 2717 NOTREACHED(); |
| 2718 return false; | 2718 return false; |
| 2719 } | 2719 } |
| 2720 | 2720 |
| 2721 active_it->second.stream->OnPushPromiseHeadersReceived(headers); | 2721 active_it->second.stream->OnPushPromiseHeadersReceived(headers); |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3274 if (!queue->empty()) { | 3274 if (!queue->empty()) { |
| 3275 SpdyStreamId stream_id = queue->front(); | 3275 SpdyStreamId stream_id = queue->front(); |
| 3276 queue->pop_front(); | 3276 queue->pop_front(); |
| 3277 return stream_id; | 3277 return stream_id; |
| 3278 } | 3278 } |
| 3279 } | 3279 } |
| 3280 return 0; | 3280 return 0; |
| 3281 } | 3281 } |
| 3282 | 3282 |
| 3283 } // namespace net | 3283 } // namespace net |
| OLD | NEW |