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

Unified Diff: ppapi/nacl_irt/plugin_startup.cc

Issue 2081183005: Use ChannelMojo from the browser to NaCl loader process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-ipc-channel-handle
Patch Set: rebase 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
« ppapi/nacl_irt/irt_start.cc ('K') | « ppapi/nacl_irt/plugin_startup.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/nacl_irt/plugin_startup.cc
diff --git a/ppapi/nacl_irt/plugin_startup.cc b/ppapi/nacl_irt/plugin_startup.cc
index c7b818dd11ad4e392186fc86ba7dc62444003e1c..66521e306370b98eb2e22fd9e30a9072a537ebb5 100644
--- a/ppapi/nacl_irt/plugin_startup.cc
+++ b/ppapi/nacl_irt/plugin_startup.cc
@@ -59,13 +59,17 @@ void SetIPCFileDescriptors(
g_manifest_service_fd = manifest_service_fd;
}
-void StartUpPlugin() {
+void StartUpPlugin(bool initialize_mojo) {
// The start up must be called only once.
DCHECK(!g_shutdown_event);
DCHECK(!g_io_thread);
- // The Mojo EDK must be initialized before using IPC.
- mojo::edk::Init();
+ // In some cases, Mojo has already been initialized, so we need to avoid
+ // double-initializing it.
+ if (initialize_mojo) {
+ // The Mojo EDK must be initialized before using IPC.
+ mojo::edk::Init();
+ }
g_shutdown_event =
new base::WaitableEvent(base::WaitableEvent::ResetPolicy::MANUAL,
« ppapi/nacl_irt/irt_start.cc ('K') | « ppapi/nacl_irt/plugin_startup.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698