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

Issue 3076024: Fix WebSocket crash bug. (Closed)

Created:
10 years, 4 months ago by ukai
Modified:
9 years, 7 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Fix WebSocket crash bug. If SocketStream closes while waiting ResolveProxy, it badly calls DoResolveProxyComplete from DoLoop invoked by SocketStream::Close, and real callback of ResolveProxy failed to call SocketStream::OnIOCompleted. So, don't run DoLoop when closed, if SocketStream is calling APIs of proxy_service or resolver. Check closing_ after the API calls back and closes the SocketStream. r54707 broke SocketStreamTest::CloseFlushPendingWrite. This CL fixes this by not closing socket if it is still writing on the socket. BUG=50394, 46750 TEST=websocket/tests doesn't crash, and net_unittests passes Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=55043

Patch Set 1 #

Patch Set 2 : fix unittests failures #

Total comments: 4

Patch Set 3 : fix for tyoshino's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -24 lines) Patch
M net/socket_stream/socket_stream.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M net/socket_stream/socket_stream.cc View 1 2 5 chunks +53 lines, -24 lines 0 comments Download
M net/socket_stream/socket_stream_unittest.cc View 2 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
ukai
10 years, 4 months ago (2010-08-03 07:08:29 UTC) #1
tyoshino (SeeGerritForStatus)
http://codereview.chromium.org/3076024/diff/3001/4001 File net/socket_stream/socket_stream.cc (right): http://codereview.chromium.org/3076024/diff/3001/4001#newcode887 net/socket_stream/socket_stream.cc:887: DCHECK(read_buf_); we've added "&& server_closed_" above. Does this still ...
10 years, 4 months ago (2010-08-04 06:20:36 UTC) #2
ukai
http://codereview.chromium.org/3076024/diff/3001/4001 File net/socket_stream/socket_stream.cc (right): http://codereview.chromium.org/3076024/diff/3001/4001#newcode887 net/socket_stream/socket_stream.cc:887: DCHECK(read_buf_); On 2010/08/04 06:20:36, tyoshino wrote: > we've added ...
10 years, 4 months ago (2010-08-04 07:31:00 UTC) #3
tyoshino (SeeGerritForStatus)
10 years, 4 months ago (2010-08-05 08:31:54 UTC) #4
LGTM

Powered by Google App Engine
This is Rietveld 408576698