Commit d8f828e3 authored by Joe Downing's avatar Joe Downing Committed by Commit Bot

Fixing a NMH crash on Windows

A recent CL added a Mojo dependency to our host binaries.  This caused a
crash on Linux/MacOS (crbug.com/875462) which was recently fixed. I then
saw a crash in the NMH on Windows when starting the CRD App.  This is due
to the same root problem but in our Me2Me NMH binary this time.  I've
fixed the init problem and verified I can set up a host again.

I've also tested It2Me on Windows and it works fine.

BUG=875953

Change-Id: Ia22e45aa2d9ed0b1e27595e1cee1038676278b70
Reviewed-on: https://chromium-review.googlesource.com/1181928Reviewed-by: default avatarGary Kacmarcik <garykac@chromium.org>
Commit-Queue: Joe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584569}
parent 0c5e2932
......@@ -34,6 +34,7 @@ source_set("setup") {
deps = [
"//base",
"//google_apis",
"//mojo/core/embedder",
"//remoting/base:authorization",
"//remoting/host",
"//remoting/host/native_messaging",
......
......@@ -19,6 +19,7 @@
#include "base/task/task_scheduler/task_scheduler.h"
#include "base/threading/thread.h"
#include "build/build_config.h"
#include "mojo/core/embedder/embedder.h"
#include "net/url_request/url_fetcher.h"
#include "remoting/base/auto_thread_task_runner.h"
#include "remoting/base/breakpad.h"
......@@ -89,6 +90,8 @@ int Me2MeNativeMessagingHostMain(int argc, char** argv) {
base::TaskScheduler::CreateAndStartWithDefaultParams("Me2Me");
mojo::core::Init();
// An IO thread is needed for the pairing registry and URL context getter.
base::Thread io_thread("io_thread");
io_thread.StartWithOptions(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment