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

Unified Diff: webrtc/base/natserver.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/base/messagequeue.cc ('k') | webrtc/base/natsocketfactory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/natserver.cc
diff --git a/webrtc/base/natserver.cc b/webrtc/base/natserver.cc
index 222d2709e2745b0bfc0c4c8994f5124b098bf971..e00bf9f7e53404d882e0a9ebc17410c5cad8475f 100644
--- a/webrtc/base/natserver.cc
+++ b/webrtc/base/natserver.cc
@@ -10,6 +10,7 @@
#include <memory>
+#include "webrtc/base/checks.h"
#include "webrtc/base/natsocketfactory.h"
#include "webrtc/base/natserver.h"
#include "webrtc/base/logging.h"
@@ -87,7 +88,7 @@ class NATProxyServerSocket : public AsyncProxyServerSocket {
}
int family = data[1];
- ASSERT(family == AF_INET || family == AF_INET6);
+ RTC_DCHECK(family == AF_INET || family == AF_INET6);
if ((family == AF_INET && *len < kNATEncodedIPv4AddressSize) ||
(family == AF_INET6 && *len < kNATEncodedIPv6AddressSize)) {
return;
@@ -169,7 +170,7 @@ void NATServer::OnInternalUDPPacket(
Translate(route);
iter = int_map_->find(route);
}
- ASSERT(iter != int_map_->end());
+ RTC_DCHECK(iter != int_map_->end());
// Allow the destination to send packets back to the source.
iter->second->WhitelistInsert(dest_addr);
@@ -186,7 +187,7 @@ void NATServer::OnExternalUDPPacket(
// Find the translation for this addresses.
ExternalMap::iterator iter = ext_map_->find(local_addr);
- ASSERT(iter != ext_map_->end());
+ RTC_DCHECK(iter != ext_map_->end());
// Allow the NAT to reject this packet.
if (ShouldFilterOut(iter->second, remote_addr)) {
« no previous file with comments | « webrtc/base/messagequeue.cc ('k') | webrtc/base/natsocketfactory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698