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

Unified Diff: content/browser/browser_main_loop.cc

Issue 2132573002: Allow mojo sync calls in single-process mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 73ea7767ba632f9c0822e45f6775936abbcc2c75..4fa4dcd75948867bcbc0e3e945245f52c02bc416 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1162,11 +1162,15 @@ int BrowserMainLoop::BrowserThreadsStarted() {
// Bring up Mojo IPC and shell as early as possible.
- // Disallow mojo sync call in the browser process.
- bool sync_call_allowed = false;
- MojoResult result = mojo::edk::SetProperty(
- MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED, &sync_call_allowed);
- DCHECK_EQ(MOJO_RESULT_OK, result);
+ if (!parsed_command_line_.HasSwitch(switches::kSingleProcess)) {
+ // Disallow mojo sync calls in the browser process. Note that we allow sync
+ // calls in single-process mode since renderer IPCs are made from a browser
+ // thread.
+ bool sync_call_allowed = false;
+ MojoResult result = mojo::edk::SetProperty(
+ MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED, &sync_call_allowed);
+ DCHECK_EQ(MOJO_RESULT_OK, result);
+ }
mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport(
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO)
« 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