From f5ad05b1a5c878a943e82109f60526c8b909a1a7 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Tue, 6 May 2014 17:49:06 +0200 Subject: Fix an assertion in MediaCaptureDevicesDispatcher Change-Id: I169f142e867ed1bda52dff7f5f66fb88ed802c01 Reviewed-by: Andras Becsi --- src/core/web_engine_context.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 2d2a8463f..d2550e48d 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -73,6 +73,7 @@ #include "content_client_qt.h" #include "content_main_delegate_qt.h" #include "gl_context_qt.h" +#include "media_capture_devices_dispatcher.h" #include "type_conversion.h" #include "web_engine_library_info.h" #include @@ -183,4 +184,9 @@ WebEngineContext::WebEngineContext() // Once the MessageLoop has been created, attach a top-level RunLoop. m_runLoop.reset(new base::RunLoop); m_runLoop->BeforeRun(); + + // Force the initialization of MediaCaptureDevicesDispatcher on the UI + // thread to avoid a thread check assertion in its constructor when it + // first gets referenced on the IO thread. + MediaCaptureDevicesDispatcher::GetInstance(); } -- cgit v1.2.1