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

Unified Diff: mojo/edk/system/core.h

Issue 1052723003: NaCl: create a separate namespace for Mojo handles. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Tweak Created 5 years, 8 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/system_impl_private_entrypoints.cc ('k') | mojo/edk/system/core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/core.h
diff --git a/mojo/edk/system/core.h b/mojo/edk/system/core.h
index aadfb661ec241d6938165e1b716cae3fe1453eec..0c38008d7432fc4a452ac51107b5a145bffbf3eb 100644
--- a/mojo/edk/system/core.h
+++ b/mojo/edk/system/core.h
@@ -52,6 +52,15 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
// invalid.
scoped_refptr<Dispatcher> GetDispatcher(MojoHandle handle);
+ // Like |GetDispatcher()|, but also removes the handle from the handle table.
+ // On success, gets the dispatcher for a given handle (which should not be
+ // |MOJO_HANDLE_INVALID|) and removes it. (On failure, returns an appropriate
+ // result (and leaves |dispatcher| alone), namely
+ // |MOJO_RESULT_INVALID_ARGUMENT| if there's no dispatcher for the given
+ // handle or |MOJO_RESULT_BUSY| if the handle is marked as busy.)
+ MojoResult GetAndRemoveDispatcher(MojoHandle handle,
+ scoped_refptr<Dispatcher>* dispatcher);
+
// Watches on the given handle for the given signals, calling |callback| when
// a signal is satisfied or when all signals become unsatisfiable. |callback|
// must satisfy stringent requirements -- see |Awakable::Awake()| in
« no previous file with comments | « mojo/edk/embedder/system_impl_private_entrypoints.cc ('k') | mojo/edk/system/core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698