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

Unified Diff: media/audio/audio_manager_base.cc

Issue 1011683002: Lazily initialize MessageLoop for faster thread startup (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_base.cc
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc
index edaabf4c22771e71ef38a1fba14f4969e587141e..445972462c5e27f948cc1acf8aaff28aa7473f68 100644
--- a/media/audio/audio_manager_base.cc
+++ b/media/audio/audio_manager_base.cc
@@ -95,7 +95,14 @@ AudioManagerBase::AudioManagerBase(AudioLogFactory* audio_log_factory)
}
#endif
+#if defined(OS_WIN)
+ // We check COM initializer status right after calling this, so wait here
DaleCurtis 2015/03/18 22:04:28 Ah dang, I was hoping this one would be one we cou
kinuko 2015/03/19 03:08:16 I haven't taken a deeper look but I guess we can p
kinuko 2015/03/19 03:08:16 I guess we can probably fix this but with some ref
+ // until we finish audio thread initialization (where we also run COM
+ // initializer).
+ CHECK(audio_thread_.StartAndWait());
+#else
CHECK(audio_thread_.Start());
+#endif
task_runner_ = audio_thread_.message_loop_proxy();
}

Powered by Google App Engine
This is Rietveld 408576698