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

Unified Diff: webrtc/api/dtmfsender.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/api/datachannel.cc ('k') | webrtc/api/mediastream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/dtmfsender.cc
diff --git a/webrtc/api/dtmfsender.cc b/webrtc/api/dtmfsender.cc
index 8fda78430a40b242defd6b09cfb0df31281f32d1..c715d3df846f14f0605dd651f3be81be8649faef 100644
--- a/webrtc/api/dtmfsender.cc
+++ b/webrtc/api/dtmfsender.cc
@@ -81,12 +81,12 @@ DtmfSender::DtmfSender(AudioTrackInterface* track,
provider_(provider),
duration_(kDtmfDefaultDurationMs),
inter_tone_gap_(kDtmfDefaultGapMs) {
- ASSERT(track_ != NULL);
- ASSERT(signaling_thread_ != NULL);
+ RTC_DCHECK(track_ != NULL);
+ RTC_DCHECK(signaling_thread_ != NULL);
// TODO(deadbeef): Once we can use shared_ptr and weak_ptr,
// do that instead of relying on a "destroyed" signal.
if (provider_) {
- ASSERT(provider_->GetOnDestroyedSignal() != NULL);
+ RTC_DCHECK(provider_->GetOnDestroyedSignal() != NULL);
provider_->GetOnDestroyedSignal()->connect(
this, &DtmfSender::OnProviderDestroyed);
}
@@ -105,7 +105,7 @@ void DtmfSender::UnregisterObserver() {
}
bool DtmfSender::CanInsertDtmf() {
- ASSERT(signaling_thread_->IsCurrent());
+ RTC_DCHECK(signaling_thread_->IsCurrent());
if (!provider_) {
return false;
}
@@ -114,7 +114,7 @@ bool DtmfSender::CanInsertDtmf() {
bool DtmfSender::InsertDtmf(const std::string& tones, int duration,
int inter_tone_gap) {
- ASSERT(signaling_thread_->IsCurrent());
+ RTC_DCHECK(signaling_thread_->IsCurrent());
if (duration > kDtmfMaxDurationMs ||
duration < kDtmfMinDurationMs ||
@@ -172,7 +172,7 @@ void DtmfSender::OnMessage(rtc::Message* msg) {
}
void DtmfSender::DoInsertDtmf() {
- ASSERT(signaling_thread_->IsCurrent());
+ RTC_DCHECK(signaling_thread_->IsCurrent());
// Get the first DTMF tone from the tone buffer. Unrecognized characters will
// be ignored and skipped.
« no previous file with comments | « webrtc/api/datachannel.cc ('k') | webrtc/api/mediastream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698