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

Unified Diff: webrtc/call/call.cc

Issue 2151433002: Avoid race in Call destructor (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added comment Created 4 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/call.cc
diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc
index dfb1879a5fdae4acb63dbc7bc167e3f28a364da2..51e0cceac98d84b8eb87774232b54075087d5228 100644
--- a/webrtc/call/call.cc
+++ b/webrtc/call/call.cc
@@ -265,8 +265,6 @@ Call::Call(const Call::Config& config)
Call::~Call() {
RTC_DCHECK(!remb_.InUse());
RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
- UpdateSendHistograms();
- UpdateReceiveHistograms();
RTC_CHECK(audio_send_ssrcs_.empty());
RTC_CHECK(video_send_ssrcs_.empty());
RTC_CHECK(video_send_streams_.empty());
@@ -282,6 +280,12 @@ Call::~Call() {
module_process_thread_->DeRegisterModule(call_stats_.get());
module_process_thread_->Stop();
call_stats_->DeregisterStatsObserver(congestion_controller_.get());
+
+ // Only update histograms after process threads have been shut down, so that
+ // they won't try to concurrently update stats.
+ UpdateSendHistograms();
+ UpdateReceiveHistograms();
+
Trace::ReturnTrace();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698