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

Unified Diff: content/browser/browser_main_loop.cc

Issue 1894273002: Fix chrome crashing in mash_session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index e96d2f9261c2a58bb5d08794476dff03f9825fd4..930b922007bc7b9e177e9d8d976d4f978fb1c071 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -6,7 +6,9 @@
#include <stddef.h>
+#include <string>
#include <utility>
+#include <vector>
#include "base/bind.h"
#include "base/command_line.h"
@@ -908,20 +910,6 @@ int BrowserMainLoop::CreateThreads() {
}
int BrowserMainLoop::PreMainMessageLoopRun() {
- if (IsRunningInMojoShell()) {
- if (!MojoShellConnectionImpl::CreateUsingFactory()) {
- mojo::edk::SetParentPipeHandleFromCommandLine();
- MojoShellConnectionImpl::Create();
- MojoShellConnectionImpl::Get()->BindToRequestFromCommandLine();
- }
-#if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
- if (MojoShellConnection::Get()) {
- views::WindowManagerConnection::Create(
- MojoShellConnection::Get()->GetConnector());
- }
-#endif
- }
-
if (parts_) {
TRACE_EVENT0("startup",
"BrowserMainLoop::CreateThreads:PreMainMessageLoopRun");
@@ -1172,6 +1160,21 @@ int BrowserMainLoop::BrowserThreadsStarted() {
mojo_ipc_support_.reset(new IPC::ScopedIPCSupport(
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO)
->task_runner()));
+
+ if (IsRunningInMojoShell()) {
+ if (!MojoShellConnectionImpl::CreateUsingFactory()) {
+ mojo::edk::SetParentPipeHandleFromCommandLine();
+ MojoShellConnectionImpl::Create();
+ MojoShellConnectionImpl::Get()->BindToRequestFromCommandLine();
+ }
+#if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
+ if (MojoShellConnection::Get()) {
+ views::WindowManagerConnection::Create(
+ MojoShellConnection::Get()->GetConnector());
+ }
+#endif
+ }
+
mojo_shell_context_.reset(new MojoShellContext);
#if defined(OS_MACOSX)
mojo::edk::SetMachPortProvider(MachBroker::GetInstance());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698