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

Unified Diff: content/browser/browser_main_loop.cc

Issue 2084993002: Mojo: add support for disallowing sync calls for a process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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 | « components/mus/common/gpu_service.cc ('k') | mojo/edk/embedder/embedder.h » ('j') | 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 b53236dd828b8a7eaeffe2e4de7ee55406f8a46b..8c90372bed2931a50d01a8404fec70de81c6e0ff 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1155,6 +1155,13 @@ int BrowserMainLoop::BrowserThreadsStarted() {
TRACE_EVENT0("startup", "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);
+
mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport(
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO)
->task_runner()));
« no previous file with comments | « components/mus/common/gpu_service.cc ('k') | mojo/edk/embedder/embedder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698