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

Unified Diff: media/audio/audio_manager.h

Issue 1036703002: Add a hang monitor for the audio thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
Index: media/audio/audio_manager.h
diff --git a/media/audio/audio_manager.h b/media/audio/audio_manager.h
index 7705cdb804ee516b254beb0fe8d35d51a61f738c..5e49b8b399afd138c35f659d73823be06a0e9567 100644
--- a/media/audio/audio_manager.h
+++ b/media/audio/audio_manager.h
@@ -34,6 +34,13 @@ class MEDIA_EXPORT AudioManager {
// such |audio_log_factory| must outlive the AudioManager.
static AudioManager* Create(AudioLogFactory* audio_log_factory);
+ // Similar to Create() except also schedules a monitor on the given task
+ // runner to ensure the audio thread is not stuck for more than 60 seconds; if
+ // a hang is detected, the process will be crashed.
nasko 2015/03/25 17:28:00 nit: s/crashed/terminated/.
DaleCurtis 2015/03/25 20:28:56 Will change in followup patch set after discussion
nasko 2015/03/25 20:52:23 No need to change. After chatting, it is actually
+ static AudioManager* CreateWithHangTimer(
+ AudioLogFactory* audio_log_factory,
+ const scoped_refptr<base::SingleThreadTaskRunner>& monitor_task_runner);
+
// Similar to Create() except uses a FakeAudioLogFactory for testing.
static AudioManager* CreateForTesting();

Powered by Google App Engine
This is Rietveld 408576698