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

Unified Diff: content/browser/browser_main_loop.cc

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
« no previous file with comments | « no previous file | media/audio/audio_manager.h » ('j') | media/audio/audio_manager.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index ff7508f09e3faf53897896970f9de63b046f3a31..874b3ebd60413920d0ebb39c3e60d7c692b102a9 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1353,7 +1353,11 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
}
{
TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:AudioMan");
- audio_manager_->Shutdown();
+ if (!audio_manager_->Shutdown()) {
+ // Intentionally leak AudioManager if shutdown failed.
+ // We might run into various CHECK(s) in AudioManager destructor.
+ ignore_result(audio_manager_.release());
+ }
}
if (parts_) {
« no previous file with comments | « no previous file | media/audio/audio_manager.h » ('j') | media/audio/audio_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698