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

Unified Diff: media/audio/audio_input_controller.h

Issue 2954323002: Fixed AudioInputController muted state related tsan bug. (Closed)
Patch Set: Rebased Created 3 years, 6 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 | media/audio/audio_input_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_input_controller.h
diff --git a/media/audio/audio_input_controller.h b/media/audio/audio_input_controller.h
index 2b8669c27555e9db338f381e0d98af83f694e62a..2711fdb11b290f592d163f96f93fba8c458902e0 100644
--- a/media/audio/audio_input_controller.h
+++ b/media/audio/audio_input_controller.h
@@ -378,7 +378,10 @@ class MEDIA_EXPORT AudioInputController
base::TimeTicks stream_create_time_;
bool is_muted_ = false;
- base::RepeatingTimer check_muted_state_timer_;
+
+ // Timer cannot be destroyed in destructor, due to threading, so keep it in an
+ // Optional.
+ base::Optional<base::RepeatingTimer> check_muted_state_timer_;
#if BUILDFLAG(ENABLE_WEBRTC)
// Used for audio debug recordings. Accessed on audio thread.
« no previous file with comments | « no previous file | media/audio/audio_input_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698