Index: content/browser/browser_main_loop.cc |
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc |
index 62b6ed3fcfa7192f6fa234dbb9096ac7d633f39b..12d56e0cebe8a041c77623462b010709245478b1 100644 |
--- a/content/browser/browser_main_loop.cc |
+++ b/content/browser/browser_main_loop.cc |
@@ -690,8 +690,8 @@ int BrowserMainLoop::PreCreateThreads() { |
#endif |
#if defined(ENABLE_PLUGINS) |
- // Prior to any processing happening on the io thread, we create the |
- // plugin service as it is predominantly used from the io thread, |
+ // Prior to any processing happening on the IO thread, we create the |
+ // plugin service as it is predominantly used from the IO thread, |
// but must be created on the main thread. The service ctor is |
// inexpensive and does not invoke the io_thread() accessor. |
{ |
@@ -948,7 +948,13 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() { |
if (resource_dispatcher_host_) { |
TRACE_EVENT0("shutdown", |
"BrowserMainLoop::Subsystem:ResourceDispatcherHost"); |
- resource_dispatcher_host_.get()->Shutdown(); |
+ resource_dispatcher_host_->Shutdown(); |
+ } |
+ // Request shutdown to clean up allocated resources on the IO thread. |
+ if (midi_manager_) { |
+ TRACE_EVENT0("shutdown", |
+ "BrowserMainLoop::Subsystem:MidiManager"); |
+ midi_manager_->Shutdown(); |
} |
memory_pressure_monitor_.reset(); |