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

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

Issue 728043002: Revert of Update mojo sdk to rev afb4440fd5a10cba980878c326180b7ad7960480 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/message_pipe.cc ('k') | mojo/edk/system/message_pipe_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/message_pipe_dispatcher.cc
diff --git a/mojo/edk/system/message_pipe_dispatcher.cc b/mojo/edk/system/message_pipe_dispatcher.cc
index 826cf2695a72e6f631cb8e4fdb73e19392c1fb82..7db16e84dced5fe078fc059b6710d4f07007e0e1 100644
--- a/mojo/edk/system/message_pipe_dispatcher.cc
+++ b/mojo/edk/system/message_pipe_dispatcher.cc
@@ -8,7 +8,7 @@
#include "mojo/edk/system/channel.h"
#include "mojo/edk/system/channel_endpoint.h"
#include "mojo/edk/system/channel_endpoint_id.h"
-#include "mojo/edk/system/configuration.h"
+#include "mojo/edk/system/constants.h"
#include "mojo/edk/system/local_message_pipe_endpoint.h"
#include "mojo/edk/system/memory.h"
#include "mojo/edk/system/message_pipe.h"
@@ -173,17 +173,16 @@
uint32_t num_bytes,
std::vector<DispatcherTransport>* transports,
MojoWriteMessageFlags flags) {
- DCHECK(!transports ||
- (transports->size() > 0 &&
- transports->size() <= GetConfiguration().max_message_num_handles));
-
- lock().AssertAcquired();
-
- if (num_bytes > GetConfiguration().max_message_num_bytes)
+ DCHECK(!transports || (transports->size() > 0 &&
+ transports->size() <= kMaxMessageNumHandles));
+
+ lock().AssertAcquired();
+
+ if (num_bytes > kMaxMessageNumBytes)
return MOJO_RESULT_RESOURCE_EXHAUSTED;
- return message_pipe_->WriteMessage(port_, bytes, num_bytes, transports,
- flags);
+ return message_pipe_->WriteMessage(
+ port_, bytes, num_bytes, transports, flags);
}
MojoResult MessagePipeDispatcher::ReadMessageImplNoLock(
@@ -193,8 +192,8 @@
uint32_t* num_dispatchers,
MojoReadMessageFlags flags) {
lock().AssertAcquired();
- return message_pipe_->ReadMessage(port_, bytes, num_bytes, dispatchers,
- num_dispatchers, flags);
+ return message_pipe_->ReadMessage(
+ port_, bytes, num_bytes, dispatchers, num_dispatchers, flags);
}
HandleSignalsState MessagePipeDispatcher::GetHandleSignalsStateImplNoLock()
@@ -209,8 +208,8 @@
uint32_t context,
HandleSignalsState* signals_state) {
lock().AssertAcquired();
- return message_pipe_->AddWaiter(port_, waiter, signals, context,
- signals_state);
+ return message_pipe_->AddWaiter(
+ port_, waiter, signals, context, signals_state);
}
void MessagePipeDispatcher::RemoveWaiterImplNoLock(
« no previous file with comments | « mojo/edk/system/message_pipe.cc ('k') | mojo/edk/system/message_pipe_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698