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

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
« no previous file with comments | « 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 d234a2d8e0c2d952b66ec51f9e33f9eef5ccf6da..2b9270ef302544ba577420cea49dcf61c7ba286c 100644
--- a/ppapi/nacl_irt/plugin_startup.cc
+++ b/ppapi/nacl_irt/plugin_startup.cc
@@ -65,13 +65,17 @@ void SetIPCChannelHandles(
g_manifest_service_handle = new IPC::ChannelHandle(manifest_service_handle);
}
-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,
« no previous file with comments | « ppapi/nacl_irt/plugin_startup.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698