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

Unified Diff: talk/app/webrtc/dtmfsender.cc

Issue 1590333004: Making WebRtcSession fire a destroyed signal. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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 | « no previous file | talk/app/webrtc/webrtcsession.h » ('j') | talk/app/webrtc/webrtcsession_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/dtmfsender.cc
diff --git a/talk/app/webrtc/dtmfsender.cc b/talk/app/webrtc/dtmfsender.cc
index 3b311df320d62c0c23630bc7a40306faf6b7032b..30e2ce3873deca75717e3a0a2037caf6fd4a88e3 100644
--- a/talk/app/webrtc/dtmfsender.cc
+++ b/talk/app/webrtc/dtmfsender.cc
@@ -99,6 +99,8 @@ DtmfSender::DtmfSender(AudioTrackInterface* track,
inter_tone_gap_(kDtmfDefaultGapMs) {
ASSERT(track_ != NULL);
ASSERT(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);
provider_->GetOnDestroyedSignal()->connect(
@@ -107,10 +109,6 @@ DtmfSender::DtmfSender(AudioTrackInterface* track,
}
DtmfSender::~DtmfSender() {
- if (provider_) {
- ASSERT(provider_->GetOnDestroyedSignal() != NULL);
- provider_->GetOnDestroyedSignal()->disconnect(this);
Taylor Brandstetter 2016/01/16 00:55:10 This doesn't hurt anything, but it's pointless sin
- }
StopSending();
}
« no previous file with comments | « no previous file | talk/app/webrtc/webrtcsession.h » ('j') | talk/app/webrtc/webrtcsession_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698