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

Unified Diff: mojo/system/channel.cc

Issue 172953003: Mojo: Make MessageInTransit more opaque. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | « no previous file | mojo/system/message_in_transit.h » ('j') | mojo/system/message_in_transit.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/channel.cc
diff --git a/mojo/system/channel.cc b/mojo/system/channel.cc
index 78d59c7b5905d6d013c8489980bf7bc7af1b8842..2bd742058053451883a1fd6586c7f92b27602751 100644
--- a/mojo/system/channel.cc
+++ b/mojo/system/channel.cc
@@ -193,9 +193,7 @@ void Channel::OnReadMessageForDownstream(const MessageInTransit& message) {
// We need to duplicate the message, because |EnqueueMessage()| will take
// ownership of it.
// TODO(vtl): Need to enforce limits on message size and handle count.
- MessageInTransit* own_message = MessageInTransit::Create(
- message.type(), message.subtype(), message.bytes(), message.num_bytes(),
- message.num_handles());
+ MessageInTransit* own_message = message.Clone();
std::vector<DispatcherTransport> transports(message.num_handles());
// TODO(vtl): Create dispatchers for handles.
// TODO(vtl): It's bad that the current API will create equivalent dispatchers
« no previous file with comments | « no previous file | mojo/system/message_in_transit.h » ('j') | mojo/system/message_in_transit.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698