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

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

Issue 2052553002: Add Core::ReplaceHandleWithReducedRights(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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/system/dispatcher.h ('k') | mojo/edk/system/handle_table.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/handle_table.h
diff --git a/mojo/edk/system/handle_table.h b/mojo/edk/system/handle_table.h
index e1d91a03ee8db15549c5e3dd64c00d3b71e22e76..0bb2937dafec5b0fccd21a75d5adecef61c6cadf 100644
--- a/mojo/edk/system/handle_table.h
+++ b/mojo/edk/system/handle_table.h
@@ -74,13 +74,21 @@ class HandleTable {
// (and all the handles unadded) and |handle_values[...]| untouched.
bool AddHandleVector(HandleVector* handles, MojoHandle* handle_values);
+ // Replaces the given handle value with an "equivalent" one with the specified
+ // rights not removed. (The handle need not have those rights in the first
+ // place.) |handle_value| should not be |MOJO_HANDLE_INVALID|.
+ MojoResult ReplaceHandleWithReducedRights(
+ MojoHandle handle_value,
+ MojoHandleRights rights_to_remove,
+ MojoHandle* replacement_handle_value);
+
// Tries to mark the given handle values as busy and start transport on them
// (i.e., take their dispatcher locks). The handles to be transported must all
// have the |MOJO_HANDLE_RIGHT_TRANSFER| right. |transports| must be sized to
// contain |num_handles| elements. On failure, returns them to their original
// (non-busy, unlocked state).
MojoResult MarkBusyAndStartTransport(
- MojoHandle disallowed_handle,
+ MojoHandle disallowed_handle_value,
const MojoHandle* handle_values,
uint32_t num_handles,
std::vector<HandleTransport>* transports);
« no previous file with comments | « mojo/edk/system/dispatcher.h ('k') | mojo/edk/system/handle_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698