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

Issue 2828223002: Delete method MessageQueue::set_socketserver (Closed)

Created:
3 years, 8 months ago by nisse-webrtc
Modified:
3 years, 7 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Delete method MessageQueue::set_socketserver Instead, make the pointer to the associated socket server a construction time const, and delete its lock. Introduces a helper class AutoSocketServerThread for code (mainly tests) which need a socket server associated with the current thread. BUG=webrtc:7501 Review-Url: https://codereview.webrtc.org/2828223002 Cr-Commit-Position: refs/heads/master@{#18047} Committed: https://chromium.googlesource.com/external/webrtc/+/7eaa4ea75f8d3440b735c0b8311b4c9c7997763d

Patch Set 1 #

Patch Set 2 : Convert ssladapter_unittest.cc to not use SocketServerScoped. #

Patch Set 3 : Move ScopedCurrentThread to thread.h. Attempt to update win32socketserver_unittest.cc. #

Patch Set 4 : Fix syntax error in windows file. #

Patch Set 5 : Update ortcfactory_unittest.cc. #

Patch Set 6 : Update p2ptransportchannel_unittest.cc. #

Patch Set 7 : Update port_unittest.cc. #

Patch Set 8 : Updated remaining p2p unit tests. #

Patch Set 9 : Update webrtcsession_unittest.cc. #

Patch Set 10 : Delete class SocketServerScope. #

Patch Set 11 : Rebased. #

Patch Set 12 : Replace ScopedCurrentThread with AutoSocketServerThread. #

Patch Set 13 : Delete method MessageQueue::set_socketserver. #

Patch Set 14 : Attempt to fix compile error in win32socketserver_unittest.cc. #

Patch Set 15 : Use AutoSocketServerThread at one more place, missed in prev patchset. #

Total comments: 4

Patch Set 16 : Delete redundant private: #

Total comments: 14

Patch Set 17 : Address nits. #

Patch Set 18 : Let AutoSocketServerThread call MessageQueueManager::Remove and MessageQueueManager::Add on limbo t… #

Patch Set 19 : Fix memory leak involving cricket::Connection::Destroy. #

Patch Set 20 : Fix memory leak in SSLAdapterTestBase. #

Total comments: 2

Patch Set 21 : Use unique_ptr, fixing one leak in VirtualSocketServerTest. #

Total comments: 2

Patch Set 22 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -153 lines) Patch
M webrtc/base/messagequeue.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +1 line, -4 lines 0 comments Download
M webrtc/base/messagequeue.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +0 lines, -15 lines 0 comments Download
M webrtc/base/physicalsocketserver_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -4 lines 0 comments Download
M webrtc/base/proxy_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +3 lines, -3 lines 0 comments Download
M webrtc/base/ssladapter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +4 lines, -3 lines 0 comments Download
M webrtc/base/thread.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +10 lines, -11 lines 0 comments Download
M webrtc/base/thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +22 lines, -0 lines 0 comments Download
M webrtc/base/virtualsocket_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +2 lines, -3 lines 0 comments Download
M webrtc/base/win32socketserver.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +2 lines, -6 lines 0 comments Download
M webrtc/base/win32socketserver.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -3 lines 0 comments Download
M webrtc/base/win32socketserver_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +5 lines, -5 lines 0 comments Download
M webrtc/examples/peerconnection/client/linux/main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +11 lines, -10 lines 0 comments Download
M webrtc/examples/peerconnection/client/main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M webrtc/ortc/ortcfactory_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/p2p/base/asyncstuntcpsocket_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -3 lines 0 comments Download
M webrtc/p2p/base/p2ptransportchannel_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +11 lines, -13 lines 0 comments Download
M webrtc/p2p/base/port.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/p2p/base/port_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +12 lines, -14 lines 0 comments Download
M webrtc/p2p/base/relayport_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -7 lines 0 comments Download
M webrtc/p2p/base/relayserver_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/p2p/base/stunport_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/p2p/base/tcpport_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -7 lines 0 comments Download
M webrtc/p2p/base/turnport_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +9 lines, -11 lines 0 comments Download
M webrtc/p2p/base/turnserver_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +3 lines, -3 lines 0 comments Download
M webrtc/p2p/base/udptransport_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -5 lines 0 comments Download
M webrtc/p2p/client/basicportallocator_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/p2p/stunprober/stunprober_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -5 lines 0 comments Download
M webrtc/pc/webrtcsession_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +9 lines, -9 lines 0 comments Download

Messages

Total messages: 36 (18 generated)
nisse-webrtc
PTAL. If this is landed, sharedexclusivelock becomes unused. I imagine peerconnection_client needs some manual tests ...
3 years, 8 months ago (2017-04-26 14:25:22 UTC) #3
tommi
lgtm. Can we take a look at the example separately? I'm sure we can figure ...
3 years, 7 months ago (2017-04-27 13:57:08 UTC) #4
nisse-webrtc
https://codereview.webrtc.org/2828223002/diff/260001/webrtc/base/thread.h File webrtc/base/thread.h (right): https://codereview.webrtc.org/2828223002/diff/260001/webrtc/base/thread.h#newcode319 webrtc/base/thread.h:319: class AutoSocketServerThread : public Thread { On 2017/04/27 13:57:07, ...
3 years, 7 months ago (2017-04-27 14:08:56 UTC) #5
nisse-webrtc
On 2017/04/27 13:57:08, tommi (wëbrtc) wrote: > Can we take a look at the example ...
3 years, 7 months ago (2017-04-27 14:10:36 UTC) #6
tommi
On 2017/04/27 14:10:36, nisse-webrtc wrote: > On 2017/04/27 13:57:08, tommi (wëbrtc) wrote: > > Can ...
3 years, 7 months ago (2017-04-27 14:22:57 UTC) #7
Taylor Brandstetter
lgtm with some minor comments https://codereview.webrtc.org/2828223002/diff/280001/webrtc/base/messagequeue.cc File webrtc/base/messagequeue.cc (right): https://codereview.webrtc.org/2828223002/diff/280001/webrtc/base/messagequeue.cc#newcode149 webrtc/base/messagequeue.cc:149: if (!queue->IsProcessingMessages() || queue->empty()) ...
3 years, 7 months ago (2017-04-28 02:59:34 UTC) #8
nisse-webrtc
https://codereview.webrtc.org/2828223002/diff/280001/webrtc/base/messagequeue.cc File webrtc/base/messagequeue.cc (right): https://codereview.webrtc.org/2828223002/diff/280001/webrtc/base/messagequeue.cc#newcode149 webrtc/base/messagequeue.cc:149: if (!queue->IsProcessingMessages() || queue->empty()) { On 2017/04/28 02:59:34, Taylor ...
3 years, 7 months ago (2017-04-28 09:46:52 UTC) #11
Taylor Brandstetter
https://codereview.webrtc.org/2828223002/diff/280001/webrtc/base/thread.cc File webrtc/base/thread.cc (right): https://codereview.webrtc.org/2828223002/diff/280001/webrtc/base/thread.cc#newcode533 webrtc/base/thread.cc:533: old_thread_ = ThreadManager::Instance()->CurrentThread(); On 2017/04/28 09:46:52, nisse-webrtc wrote: > ...
3 years, 7 months ago (2017-04-28 16:59:45 UTC) #14
nisse-webrtc
On 2017/04/28 16:59:45, Taylor Brandstetter wrote: > However: we may still want to call "MessageQueueManager::Remove/Add" ...
3 years, 7 months ago (2017-05-02 08:35:15 UTC) #15
nisse-webrtc
On 2017/05/02 08:35:15, nisse-webrtc wrote: > There's also the memory leak, hopefully fixed in patchset ...
3 years, 7 months ago (2017-05-02 08:44:21 UTC) #16
nisse-webrtc
Fixed one more leak. Intend to land when bots are green (but about to leave ...
3 years, 7 months ago (2017-05-02 14:39:20 UTC) #19
Taylor Brandstetter
https://codereview.webrtc.org/2828223002/diff/360001/webrtc/base/thread.cc File webrtc/base/thread.cc (right): https://codereview.webrtc.org/2828223002/diff/360001/webrtc/base/thread.cc#newcode545 webrtc/base/thread.cc:545: // cricket::Connection::Destroy. I'd consider this a bug with cricket::Connection::Destroy. ...
3 years, 7 months ago (2017-05-03 22:17:27 UTC) #22
nisse-webrtc
https://codereview.webrtc.org/2828223002/diff/360001/webrtc/base/thread.cc File webrtc/base/thread.cc (right): https://codereview.webrtc.org/2828223002/diff/360001/webrtc/base/thread.cc#newcode545 webrtc/base/thread.cc:545: // cricket::Connection::Destroy. On 2017/05/03 22:17:27, Taylor Brandstetter wrote: > ...
3 years, 7 months ago (2017-05-05 07:58:36 UTC) #23
Taylor Brandstetter
https://codereview.webrtc.org/2828223002/diff/380001/webrtc/base/virtualsocket_unittest.cc File webrtc/base/virtualsocket_unittest.cc (left): https://codereview.webrtc.org/2828223002/diff/380001/webrtc/base/virtualsocket_unittest.cc#oldcode206 webrtc/base/virtualsocket_unittest.cc:206: void BasicTest(const SocketAddress& initial_addr) { On 2017/05/05 07:58:36, nisse-webrtc ...
3 years, 7 months ago (2017-05-05 08:47:46 UTC) #24
nisse-webrtc
On 2017/05/05 08:47:46, Taylor Brandstetter wrote: > My guess is that Thread indirectly references the ...
3 years, 7 months ago (2017-05-05 08:57:41 UTC) #25
nisse-webrtc
On 2017/05/05 08:57:41, nisse-webrtc wrote: > On 2017/05/05 08:47:46, Taylor Brandstetter wrote: > > My ...
3 years, 7 months ago (2017-05-08 11:21:37 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2828223002/400001
3 years, 7 months ago (2017-05-08 12:23:04 UTC) #33
commit-bot: I haz the power
3 years, 7 months ago (2017-05-08 12:25:48 UTC) #36
Message was sent while issue was closed.
Committed patchset #22 (id:400001) as
https://chromium.googlesource.com/external/webrtc/+/7eaa4ea75f8d3440b735c0b83...

Powered by Google App Engine
This is Rietveld 408576698