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

Issue 26544003: Make net::WebSocketChannel deletion safe and enable new IPCs (Closed)

Created:
7 years, 2 months ago by Adam Rice
Modified:
7 years, 1 month ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

See https://docs.google.com/a/chromium.org/document/d/1fMxcEFiVj-H5vmuxhPqsxJAl98GS6_yZ-wqB6j9Wmy0/pub for motivation and design. Also add tests that it doesn't crash when deleted. Also add the WebSocketDispatcherHost to the filters for IPC channels. BUG=305515 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=230712

Patch Set 1 #

Patch Set 2 : Add changes in content/ #

Patch Set 3 : Compile and comment fixes. #

Patch Set 4 : Fix bad upload. #

Patch Set 5 : Stop support redundant call to DeleteWebSocketHost #

Patch Set 6 : Stop support redundant call to DeleteWebSocketHost #

Patch Set 7 : Fix an error with the OnDropChannelCalledOnce test #

Patch Set 8 : Comment that WebSocketStream objects may be deleted from within the WriteFrames callback. #

Patch Set 9 : Add missing OVERRIDE annotation. #

Total comments: 30

Patch Set 10 : Fixes from yhirano review. #

Patch Set 11 : Missing bits from last upload. #

Total comments: 1

Patch Set 12 : Minor comment fix. #

Total comments: 14

Patch Set 13 : Reduce number of CHANNEL_DELETED checks. #

Total comments: 7

Patch Set 14 : Merged https://codereview.chromium.org/27456002/ #

Patch Set 15 : Rebase. #

Patch Set 16 : Add missing "virtual" keyword #

Total comments: 6

Patch Set 17 : Fixes from jochen review. #

Patch Set 18 : Rebase. #

Patch Set 19 : Rebase (again). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+668 lines, -266 lines) Patch
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +8 lines, -0 lines 0 comments Download
M content/browser/renderer_host/websocket_dispatcher_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +35 lines, -19 lines 0 comments Download
M content/browser/renderer_host/websocket_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +43 lines, -21 lines 0 comments Download
M content/browser/renderer_host/websocket_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/websocket_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +45 lines, -27 lines 0 comments Download
M net/websockets/websocket_channel.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +30 lines, -18 lines 0 comments Download
M net/websockets/websocket_channel.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 23 chunks +139 lines, -121 lines 0 comments Download
M net/websockets/websocket_channel_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 chunks +329 lines, -39 lines 0 comments Download
M net/websockets/websocket_event_interface.h View 3 chunks +26 lines, -19 lines 0 comments Download
M net/websockets/websocket_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +11 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
Adam Rice
7 years, 2 months ago (2013-10-10 05:57:35 UTC) #1
yhirano
https://codereview.chromium.org/26544003/diff/36001/content/browser/renderer_host/websocket_dispatcher_host.cc File content/browser/renderer_host/websocket_dispatcher_host.cc (right): https://codereview.chromium.org/26544003/diff/36001/content/browser/renderer_host/websocket_dispatcher_host.cc#newcode117 content/browser/renderer_host/websocket_dispatcher_host.cc:117: if (SendOrDrop(new WebSocketMsg_DropChannel(routing_id, code, reason)) == I'm not sure ...
7 years, 2 months ago (2013-10-10 09:22:26 UTC) #2
Adam Rice
https://codereview.chromium.org/26544003/diff/36001/content/browser/renderer_host/websocket_dispatcher_host.cc File content/browser/renderer_host/websocket_dispatcher_host.cc (right): https://codereview.chromium.org/26544003/diff/36001/content/browser/renderer_host/websocket_dispatcher_host.cc#newcode117 content/browser/renderer_host/websocket_dispatcher_host.cc:117: if (SendOrDrop(new WebSocketMsg_DropChannel(routing_id, code, reason)) == On 2013/10/10 09:22:27, ...
7 years, 2 months ago (2013-10-11 05:42:54 UTC) #3
Adam Rice
Sorry, there were two changes missing from my last upload. Sorry if you already looked ...
7 years, 2 months ago (2013-10-11 07:06:15 UTC) #4
Adam Rice
https://codereview.chromium.org/26544003/diff/36001/net/websockets/websocket_channel.h File net/websockets/websocket_channel.h (right): https://codereview.chromium.org/26544003/diff/36001/net/websockets/websocket_channel.h#newcode203 net/websockets/websocket_channel.h:203: ChannelState FailChannel(ExposeError expose, On 2013/10/10 09:22:27, yhirano wrote: > ...
7 years, 2 months ago (2013-10-11 11:22:42 UTC) #5
yhirano
lgtm https://codereview.chromium.org/26544003/diff/55001/net/websockets/websocket_channel_test.cc File net/websockets/websocket_channel_test.cc (right): https://codereview.chromium.org/26544003/diff/55001/net/websockets/websocket_channel_test.cc#newcode881 net/websockets/websocket_channel_test.cc:881: // verify that there are no use-after-free bugs ...
7 years, 2 months ago (2013-10-15 04:50:17 UTC) #6
Adam Rice
+tyoshino for net/websockets/ OWNERS +jochen for content/browser/renderer_host/ OWNERS
7 years, 2 months ago (2013-10-15 05:04:22 UTC) #7
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/26544003/diff/67001/content/browser/renderer_host/websocket_dispatcher_host.cc File content/browser/renderer_host/websocket_dispatcher_host.cc (right): https://codereview.chromium.org/26544003/diff/67001/content/browser/renderer_host/websocket_dispatcher_host.cc#newcode113 content/browser/renderer_host/websocket_dispatcher_host.cc:113: WebSocketHostState WebSocketDispatcherHost::DoDropChannel( this method always deletes the corresponding channel. ...
7 years, 2 months ago (2013-10-15 07:22:15 UTC) #8
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/26544003/diff/67001/net/websockets/websocket_event_interface.h File net/websockets/websocket_event_interface.h (right): https://codereview.chromium.org/26544003/diff/67001/net/websockets/websocket_event_interface.h#newcode70 net/websockets/websocket_event_interface.h:70: // must delete the Channel and return CHANNEL_DELETED. I ...
7 years, 2 months ago (2013-10-15 07:54:58 UTC) #9
Adam Rice
https://codereview.chromium.org/26544003/diff/67001/content/browser/renderer_host/websocket_dispatcher_host.cc File content/browser/renderer_host/websocket_dispatcher_host.cc (right): https://codereview.chromium.org/26544003/diff/67001/content/browser/renderer_host/websocket_dispatcher_host.cc#newcode113 content/browser/renderer_host/websocket_dispatcher_host.cc:113: WebSocketHostState WebSocketDispatcherHost::DoDropChannel( On 2013/10/15 07:22:15, tyoshino wrote: > this ...
7 years, 2 months ago (2013-10-15 08:31:42 UTC) #10
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/26544003/diff/67001/net/websockets/websocket_channel_test.cc File net/websockets/websocket_channel_test.cc (right): https://codereview.chromium.org/26544003/diff/67001/net/websockets/websocket_channel_test.cc#newcode577 net/websockets/websocket_channel_test.cc:577: // should not be called. how about indenting ...
7 years, 2 months ago (2013-10-15 10:16:10 UTC) #11
Adam Rice
https://codereview.chromium.org/26544003/diff/67001/net/websockets/websocket_channel_test.cc File net/websockets/websocket_channel_test.cc (right): https://codereview.chromium.org/26544003/diff/67001/net/websockets/websocket_channel_test.cc#newcode577 net/websockets/websocket_channel_test.cc:577: // should not be called. On 2013/10/15 10:16:10, tyoshino ...
7 years, 2 months ago (2013-10-15 10:50:10 UTC) #12
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/26544003/diff/77001/net/websockets/websocket_channel.cc File net/websockets/websocket_channel.cc (right): https://codereview.chromium.org/26544003/diff/77001/net/websockets/websocket_channel.cc#newcode305 net/websockets/websocket_channel.cc:305: return CHANNEL_ALIVE; On 2013/10/15 10:50:11, Adam Rice wrote: > ...
7 years, 2 months ago (2013-10-15 11:47:22 UTC) #13
jochen (gone - plz use gerrit)
I'm still very concerned that this is dead code (the content bits). I think there ...
7 years, 2 months ago (2013-10-15 23:57:36 UTC) #14
Adam Rice
On 2013/10/15 23:57:36, jochen wrote: > I'm still very concerned that this is dead code ...
7 years, 2 months ago (2013-10-16 07:41:25 UTC) #15
jochen (gone - plz use gerrit)
On 2013/10/16 07:41:25, Adam Rice wrote: > On 2013/10/15 23:57:36, jochen wrote: > > I'm ...
7 years, 2 months ago (2013-10-19 01:29:12 UTC) #16
tyoshino (SeeGerritForStatus)
On 2013/10/19 01:29:12, jochen wrote: > I still don't understand this, sorry > > Why ...
7 years, 2 months ago (2013-10-21 05:33:08 UTC) #17
jochen (gone - plz use gerrit)
On 2013/10/21 05:33:08, tyoshino wrote: > On 2013/10/19 01:29:12, jochen wrote: > > I still ...
7 years, 2 months ago (2013-10-22 08:18:07 UTC) #18
tyoshino (SeeGerritForStatus)
On 2013/10/22 08:18:07, jochen wrote: > On 2013/10/21 05:33:08, tyoshino wrote: > > On 2013/10/19 ...
7 years, 2 months ago (2013-10-22 08:46:22 UTC) #19
Adam Rice
Adding +tsepez for security review since this CL now enables the new IPCs.
7 years, 2 months ago (2013-10-22 11:26:21 UTC) #20
Tom Sepez
lgtm
7 years, 2 months ago (2013-10-22 16:58:41 UTC) #21
jochen (gone - plz use gerrit)
lgtm https://codereview.chromium.org/26544003/diff/323001/content/browser/renderer_host/websocket_dispatcher_host.cc File content/browser/renderer_host/websocket_dispatcher_host.cc (right): https://codereview.chromium.org/26544003/diff/323001/content/browser/renderer_host/websocket_dispatcher_host.cc#newcode19 content/browser/renderer_host/websocket_dispatcher_host.cc:19: typedef WebSocketDispatcherHost::WebSocketHostState WebSocketHostState; I find this a bit ...
7 years, 1 month ago (2013-10-23 14:01:27 UTC) #22
Adam Rice
https://codereview.chromium.org/26544003/diff/323001/content/browser/renderer_host/websocket_dispatcher_host.cc File content/browser/renderer_host/websocket_dispatcher_host.cc (right): https://codereview.chromium.org/26544003/diff/323001/content/browser/renderer_host/websocket_dispatcher_host.cc#newcode19 content/browser/renderer_host/websocket_dispatcher_host.cc:19: typedef WebSocketDispatcherHost::WebSocketHostState WebSocketHostState; On 2013/10/23 14:01:28, jochen wrote: > ...
7 years, 1 month ago (2013-10-24 02:22:23 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ricea@chromium.org/26544003/683001
7 years, 1 month ago (2013-10-24 10:28:16 UTC) #24
commit-bot: I haz the power
7 years, 1 month ago (2013-10-24 13:47:52 UTC) #25
Message was sent while issue was closed.
Change committed as 230712

Powered by Google App Engine
This is Rietveld 408576698