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

Unified Diff: webrtc/p2p/client/socketmonitor.cc

Issue 2620303003: Replace ASSERT by RTC_DCHECK in all non-test code. (Closed)
Patch Set: Address final nits. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/client/basicportallocator.cc ('k') | webrtc/p2p/quic/quictransport.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/client/socketmonitor.cc
diff --git a/webrtc/p2p/client/socketmonitor.cc b/webrtc/p2p/client/socketmonitor.cc
index 7d553b93f62f22c3f49520f4c237e7ef0c23c024..ee0d124bfd49f6efa5cbc3bc18cee0d92581ae99 100644
--- a/webrtc/p2p/client/socketmonitor.cc
+++ b/webrtc/p2p/client/socketmonitor.cc
@@ -10,6 +10,7 @@
#include "webrtc/p2p/client/socketmonitor.h"
+#include "webrtc/base/checks.h"
#include "webrtc/base/common.h"
namespace cricket {
@@ -50,7 +51,7 @@ void ConnectionMonitor::OnMessage(rtc::Message *message) {
rtc::CritScope cs(&crit_);
switch (message->message_id) {
case MSG_MONITOR_START:
- ASSERT(rtc::Thread::Current() == network_thread_);
+ RTC_DCHECK(rtc::Thread::Current() == network_thread_);
if (!monitoring_) {
monitoring_ = true;
PollConnectionStats_w();
@@ -58,7 +59,7 @@ void ConnectionMonitor::OnMessage(rtc::Message *message) {
break;
case MSG_MONITOR_STOP:
- ASSERT(rtc::Thread::Current() == network_thread_);
+ RTC_DCHECK(rtc::Thread::Current() == network_thread_);
if (monitoring_) {
monitoring_ = false;
network_thread_->Clear(this);
@@ -66,12 +67,12 @@ void ConnectionMonitor::OnMessage(rtc::Message *message) {
break;
case MSG_MONITOR_POLL:
- ASSERT(rtc::Thread::Current() == network_thread_);
+ RTC_DCHECK(rtc::Thread::Current() == network_thread_);
PollConnectionStats_w();
break;
case MSG_MONITOR_SIGNAL: {
- ASSERT(rtc::Thread::Current() == monitoring_thread_);
+ RTC_DCHECK(rtc::Thread::Current() == monitoring_thread_);
std::vector<ConnectionInfo> infos = connection_infos_;
crit_.Leave();
SignalUpdate(this, infos);
@@ -82,7 +83,7 @@ void ConnectionMonitor::OnMessage(rtc::Message *message) {
}
void ConnectionMonitor::PollConnectionStats_w() {
- ASSERT(rtc::Thread::Current() == network_thread_);
+ RTC_DCHECK(rtc::Thread::Current() == network_thread_);
rtc::CritScope cs(&crit_);
// Gather connection infos
« no previous file with comments | « webrtc/p2p/client/basicportallocator.cc ('k') | webrtc/p2p/quic/quictransport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698