summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/web_engine_context.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 2d2a8463..d2550e48 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 <QGuiApplication>
@@ -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();
}