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

Unified Diff: third_party/mojo/src/mojo/edk/system/channel_endpoint.cc

Issue 929433005: WIP: A couple of more ChannelMojo speedup ideas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build and test fix Created 5 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
Index: third_party/mojo/src/mojo/edk/system/channel_endpoint.cc
diff --git a/third_party/mojo/src/mojo/edk/system/channel_endpoint.cc b/third_party/mojo/src/mojo/edk/system/channel_endpoint.cc
index 0e071d8eef50a2187b773dee198a9886f0307fd2..f38d1b7623d29d9fd62ca60ca44d7077f623c767 100644
--- a/third_party/mojo/src/mojo/edk/system/channel_endpoint.cc
+++ b/third_party/mojo/src/mojo/edk/system/channel_endpoint.cc
@@ -92,7 +92,8 @@ void ChannelEndpoint::AttachAndRun(Channel* channel,
}
}
-void ChannelEndpoint::OnReadMessage(scoped_ptr<MessageInTransit> message) {
+void ChannelEndpoint::OnReadMessage(
+ MessageInTransit::ReadContext& reading_message) {
scoped_refptr<ChannelEndpointClient> client;
unsigned client_port = 0;
@@ -125,8 +126,7 @@ void ChannelEndpoint::OnReadMessage(scoped_ptr<MessageInTransit> message) {
client_port = client_port_;
}
- if (client->OnReadMessage(client_port, message.get())) {
- ignore_result(message.release());
+ if (client->OnReadMessage(client_port, reading_message)) {
break;
}

Powered by Google App Engine
This is Rietveld 408576698