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

Unified Diff: content/browser/browser_main_loop.cc

Issue 1315793008: Web MIDI: introduce MidiManager::Shutdown to shutdown gracefully (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more checks in unit tests Created 5 years, 3 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 | content/browser/media/midi_host_unittest.cc » ('j') | media/midi/midi_manager.h » ('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 8d55e11c240b22c39e63230a9fb0fce042331d7b..090833cf106ef2c37d83c78268463a448f870a76 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,12 @@ 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();
« no previous file with comments | « no previous file | content/browser/media/midi_host_unittest.cc » ('j') | media/midi/midi_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698