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

Unified Diff: ppapi/nacl_irt/plugin_startup.cc

Issue 2301103003: Use ChannelMojo for NaCl PPAPI channels. (Closed)
Patch Set: Created 4 years, 2 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 | « ipc/ipc_channel_handle.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 b90f14ae80123e7535a58695ddf8e1f52b94a18b..2e9392c73cee76ccd25f60be611d5d1ba6e7fa14 100644
--- a/ppapi/nacl_irt/plugin_startup.cc
+++ b/ppapi/nacl_irt/plugin_startup.cc
@@ -27,8 +27,15 @@ base::Thread* g_io_thread = NULL;
ManifestService* g_manifest_service = NULL;
bool IsValidChannelHandle(IPC::ChannelHandle* handle) {
- // ChannelMojo not yet supported.
- return handle && handle->socket.fd != -1 && !handle->mojo_handle.is_valid();
+ // In SFI mode the underlying handle is wrapped by a NaClIPCAdapter, which is
+ // exposed as an FD. Otherwise, the handle is the underlying mojo message
+ // pipe.
+ return handle &&
+#if defined(OS_NACL_SFI)
+ handle->socket.fd != -1;
+#else
+ handle->is_mojo_channel_handle();
+#endif
}
// Creates the manifest service on IO thread so that its Listener's thread and
« no previous file with comments | « ipc/ipc_channel_handle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698