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

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

Issue 1949153002: EDK: Add HandleTable::AddHandleVector(). (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/system/handle.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 19b3aa51b9e6ac820f9ca952efa98c10376cd233..4cdbd36ed4e1194141cfdc2063a9c1558b10e8f5 100644
--- a/mojo/edk/system/handle_table.h
+++ b/mojo/edk/system/handle_table.h
@@ -74,12 +74,15 @@ class HandleTable {
std::pair<MojoHandle, MojoHandle> AddHandlePair(Handle&& handle0,
Handle&& handle1);
- // Adds the given vector of dispatchers (of size at most
+ // Adds the given vector of handles (of size at most
// |kMaxMessageNumHandles|). |handle_values| must point to an array of size at
- // least |dispatchers.size()|. Unlike the other |AddDispatcher...()|
- // functions, some of the dispatchers may be invalid (null). Returns true on
- // success and false on failure (if the handle table is full), in which case
- // it leaves |handle_values[...]| untouched (and all dispatchers unadded).
+ // least |handles->size()|. Unlike the other |AddHandle...()| functions, some
+ // of the handles may be invalid ("null"). Returns true on success in which
+ // case all the handles in |*handles| are moved from, and false on failure (if
+ // the handle table is full), in which case it leaves all |handles->at(...)||
+ // (and all the handles unadded) and |handle_values[...]| untouched.
+ bool AddHandleVector(HandleVector* handles, MojoHandle* handle_values);
+ // TODO(vtl): Delete this version (use |AddHandleVector()| instead).
bool AddDispatcherVector(const DispatcherVector& dispatchers,
MojoHandle* handle_values);
« no previous file with comments | « mojo/edk/system/handle.h ('k') | mojo/edk/system/handle_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698