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

Unified Diff: media/audio/audio_manager.h

Issue 2934613002: Avoid shutdown crash if audio thread is hung. (Closed)
Patch Set: leaks audio manager 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
Index: media/audio/audio_manager.h
diff --git a/media/audio/audio_manager.h b/media/audio/audio_manager.h
index f92651ed0627934de813316751d8b6158b7c66bb..f91f6bd2a590a15737ecd67e3b62e484c9515e56 100644
--- a/media/audio/audio_manager.h
+++ b/media/audio/audio_manager.h
@@ -83,10 +83,12 @@ class MEDIA_EXPORT AudioManager {
// like src/chrome.
static AudioManager* Get();
- // Releases all audio resources.
+ // Synchronously releases all audio resources.
// Must be called before deletion and on the same thread as AudioManager
// was created.
- void Shutdown();
+ // Returns true on success but false if AudioManager could not be shutdown.
+ // AudioManager instance must not be deleted if shutdown failed.
+ bool Shutdown();
// Log callback used for sending log messages from a stream to the object
// that manages the stream.

Powered by Google App Engine
This is Rietveld 408576698