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

Issue 3035015: SPDY: Fix DeleteStream() being called twice and CloseStream() reporting a wrong stream number. (Closed)

Created:
10 years, 5 months ago by agayev
Modified:
9 years, 7 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Fix DeleteStream() being called twice per stream and CloseStream() reporting a wrong stream number. BUG=49683 TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=53784

Patch Set 1 #

Total comments: 4

Patch Set 2 : got rid of unnecessary check #

Patch Set 3 : merge with trunk #

Patch Set 4 : merge with trunk -- again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -7 lines) Patch
M net/spdy/spdy_stream.cc View 1 2 3 3 chunks +1 line, -7 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
agayev
This one should be pretty easy to review.
10 years, 5 months ago (2010-07-21 16:44:04 UTC) #1
cbentzel
Are there any unit tests which would break on the old behavior but work correctly ...
10 years, 5 months ago (2010-07-21 17:34:46 UTC) #2
erikchen
http://codereview.chromium.org/3035015/diff/1/2 File net/spdy/spdy_stream.cc (right): http://codereview.chromium.org/3035015/diff/1/2#newcode35 net/spdy/spdy_stream.cc:35: DCHECK(response_complete_); This looks like it will fail if a ...
10 years, 5 months ago (2010-07-21 18:45:31 UTC) #3
agayev
10 years, 5 months ago (2010-07-21 19:04:03 UTC) #4
http://codereview.chromium.org/3035015/diff/1/2
File net/spdy/spdy_stream.cc (left):

http://codereview.chromium.org/3035015/diff/1/2#oldcode197
net/spdy/spdy_stream.cc:197: stream_id_ = 0;
On 2010/07/21 17:34:46, cbentzel wrote:
> Are there other parts of the code base which check stream_id_ == 0 to
determine
> if closed (I seem to recall this happening)
> 
> This is probably a good change, but I'm worried about what else breaks.

The only reference to it was in ~SpdyStream above, which didn't make much sense,
since response_complete_ is set to true the moment stream_id_ is set to 0,
therefore, DCHECK would always pass.

http://codereview.chromium.org/3035015/diff/1/2
File net/spdy/spdy_stream.cc (right):

http://codereview.chromium.org/3035015/diff/1/2#newcode35
net/spdy/spdy_stream.cc:35: DCHECK(response_complete_);
On 2010/07/21 18:45:32, erikchen1 wrote:
> This looks like it will fail if a SpdyStream is constructed, and immediately
> destructed.

Is this likely?  Shouldn't OnClose() be called on stream before it is destroyed?
 Also, it seems your scenario was possible with the old check as well, since
push streams are generated with stream id of 0 and updated later, so if those
were cancelled, before push stream arrived...  

I should probably get rid of DCHECK or add another flag just for this purpose.

Powered by Google App Engine
This is Rietveld 408576698