Commit bfbe0350 authored by Lambros Lambrou's avatar Lambros Lambrou Committed by Commit Bot

[remoting host] Initialize mojo unconditionally

Mojo needs to be initialized, even in a single-process context, to fix
a crash on startup. This CL removes the condition on
remoting_multi_process for calling mojo::core::Init().

Bug: 875462
Change-Id: I021e5248aae850962c4ef53a506a2d06413aaf77
Reviewed-on: https://chromium-review.googlesource.com/1180499
Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
Reviewed-by: default avatarJoe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584250}
parent 1513b377
...@@ -699,6 +699,7 @@ if (enable_me2me_host) { ...@@ -699,6 +699,7 @@ if (enable_me2me_host) {
"//base:i18n", "//base:i18n",
"//components/policy/core/common", "//components/policy/core/common",
"//ipc", "//ipc",
"//mojo/core/embedder",
"//net", "//net",
"//remoting/base", "//remoting/base",
"//remoting/host", "//remoting/host",
...@@ -729,10 +730,6 @@ if (enable_me2me_host) { ...@@ -729,10 +730,6 @@ if (enable_me2me_host) {
if (is_mac && is_official_build) { if (is_mac && is_official_build) {
sources += [ "internal/internal_mac-inl.h" ] sources += [ "internal/internal_mac-inl.h" ]
} }
if (remoting_multi_process != 0) {
deps += [ "//mojo/core/embedder" ]
}
} }
if (is_win) { if (is_win) {
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "mojo/core/embedder/embedder.h"
#include "remoting/base/breakpad.h" #include "remoting/base/breakpad.h"
#include "remoting/host/evaluate_capability.h" #include "remoting/host/evaluate_capability.h"
#include "remoting/host/host_exit_codes.h" #include "remoting/host/host_exit_codes.h"
...@@ -28,10 +29,6 @@ ...@@ -28,10 +29,6 @@
#include "remoting/host/switches.h" #include "remoting/host/switches.h"
#include "remoting/host/usage_stats_consent.h" #include "remoting/host/usage_stats_consent.h"
#if defined(REMOTING_MULTI_PROCESS)
#include "mojo/core/embedder/embedder.h"
#endif // defined(REMOTING_MULTI_PROCESS)
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
#include "base/mac/scoped_nsautorelease_pool.h" #include "base/mac/scoped_nsautorelease_pool.h"
#endif // defined(OS_MACOSX) #endif // defined(OS_MACOSX)
...@@ -225,9 +222,7 @@ int HostMain(int argc, char** argv) { ...@@ -225,9 +222,7 @@ int HostMain(int argc, char** argv) {
remoting::LoadResources(""); remoting::LoadResources("");
#if defined(REMOTING_MULTI_PROCESS)
mojo::core::Init(); mojo::core::Init();
#endif
// Invoke the entry point. // Invoke the entry point.
int exit_code = main_routine(); int exit_code = main_routine();
......
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