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

Unified Diff: mojo/edk/system/local_message_pipe_endpoint.cc

Issue 1957553003: EDK: Plumb Handle/HandleVector yet one more layer down: MessageInTransit. (Closed) Base URL: https://github.com/domokit/mojo.git@work787_edk_handle_13.6
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/channel_endpoint.cc ('k') | mojo/edk/system/message_in_transit.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/local_message_pipe_endpoint.cc
diff --git a/mojo/edk/system/local_message_pipe_endpoint.cc b/mojo/edk/system/local_message_pipe_endpoint.cc
index b8a75ac59ab66d0c4b2e657f0f2623f49cf21f28..dd0c953a2bb93398517e9fbe4fd787572576e4c0 100644
--- a/mojo/edk/system/local_message_pipe_endpoint.cc
+++ b/mojo/edk/system/local_message_pipe_endpoint.cc
@@ -9,7 +9,6 @@
#include <utility>
#include "base/logging.h"
-#include "mojo/edk/system/dispatcher.h"
#include "mojo/edk/system/message_in_transit.h"
namespace mojo {
@@ -95,24 +94,15 @@ MojoResult LocalMessagePipeEndpoint::ReadMessage(
else
enough_space = false;
- if (DispatcherVector* queued_dispatchers = message->dispatchers()) {
+ if (HandleVector* queued_handles = message->handles()) {
if (num_handles)
- *num_handles = static_cast<uint32_t>(queued_dispatchers->size());
+ *num_handles = static_cast<uint32_t>(queued_handles->size());
if (enough_space) {
- if (queued_dispatchers->empty()) {
+ if (queued_handles->empty()) {
// Nothing to do.
- } else if (queued_dispatchers->size() <= max_num_handles) {
+ } else if (queued_handles->size() <= max_num_handles) {
DCHECK(handles);
- // TODO(vtl): The rest of this code in this block is temporary, until I
- // plumb |Handle|s into |MessageInTransit|. This should really just be
- // something like:
- // handles->swap(*queued_handles);
- handles->reserve(queued_dispatchers->size());
- for (size_t i = 0; i < queued_dispatchers->size(); i++) {
- // We're not enforcing handle rights yet, so "none" is OK.
- handles->push_back(Handle(std::move(queued_dispatchers->at(i)),
- MOJO_HANDLE_RIGHT_NONE));
- }
+ handles->swap(*queued_handles);
} else {
enough_space = false;
}
« no previous file with comments | « mojo/edk/system/channel_endpoint.cc ('k') | mojo/edk/system/message_in_transit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698