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

Unified Diff: mojo/edk/embedder/system_impl_private_entrypoints.cc

Issue 1946423002: EDK: Remove Core::AddDispatcher(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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 | « mojo/edk/embedder/multiprocess_embedder.cc ('k') | mojo/edk/system/core.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/system_impl_private_entrypoints.cc
diff --git a/mojo/edk/embedder/system_impl_private_entrypoints.cc b/mojo/edk/embedder/system_impl_private_entrypoints.cc
index 1ec1da97b713d523f1d6116f50d20f7a260fe91a..79cd3096dc76d40264556864e2615577e83d0d56 100644
--- a/mojo/edk/embedder/system_impl_private_entrypoints.cc
+++ b/mojo/edk/embedder/system_impl_private_entrypoints.cc
@@ -6,6 +6,7 @@
#include "mojo/edk/embedder/embedder_internal.h"
#include "mojo/edk/system/core.h"
#include "mojo/edk/system/dispatcher.h"
+#include "mojo/edk/system/handle.h"
#include "mojo/edk/util/ref_ptr.h"
#include "mojo/public/c/system/buffer.h"
#include "mojo/public/c/system/data_pipe.h"
@@ -59,7 +60,11 @@ MojoResult MojoSystemImplTransferHandle(MojoSystemImpl from_system,
if (result != MOJO_RESULT_OK)
return result;
- MojoHandle created_handle = to_core->AddDispatcher(d.get());
+ // TODO(vtl): The rights should come from the original handle (to be dealt
+ // with when I fix/replace |Core::GetAndRemoveDispatcher()|.
+ MojoHandle created_handle = to_core->AddHandle(mojo::system::Handle(
+ d.Clone(), MOJO_HANDLE_RIGHT_TRANSFER | MOJO_HANDLE_RIGHT_READ |
+ MOJO_HANDLE_RIGHT_WRITE));
if (created_handle == MOJO_HANDLE_INVALID) {
// The handle has been lost, unfortunately. There's no guarentee we can put
// it back where it came from, or get the original ID back. Holding locks
« no previous file with comments | « mojo/edk/embedder/multiprocess_embedder.cc ('k') | mojo/edk/system/core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698