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

Unified Diff: mojo/public/cpp/bindings/lib/router.cc

Issue 1932083002: Mojo: Use new message APIs to reduce copying (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 8 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/public/cpp/bindings/lib/pickle_buffer.cc ('k') | mojo/public/cpp/bindings/message.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/router.cc
diff --git a/mojo/public/cpp/bindings/lib/router.cc b/mojo/public/cpp/bindings/lib/router.cc
index 66d7e36def9f923587b5f5c633aa6c97c5de52c3..da5f34b1df57ce4bbfaf8668061d2bbde6bc3e49 100644
--- a/mojo/public/cpp/bindings/lib/router.cc
+++ b/mojo/public/cpp/bindings/lib/router.cc
@@ -153,11 +153,12 @@ bool Router::AcceptWithResponder(Message* message, MessageReceiver* responder) {
if (request_id == 0)
request_id = next_request_id_++;
+ bool is_sync = message->has_flag(kMessageIsSync);
message->set_request_id(request_id);
if (!connector_.Accept(message))
return false;
- if (!message->has_flag(kMessageIsSync)) {
+ if (!is_sync) {
// We assume ownership of |responder|.
async_responders_[request_id] = base::WrapUnique(responder);
return true;
« no previous file with comments | « mojo/public/cpp/bindings/lib/pickle_buffer.cc ('k') | mojo/public/cpp/bindings/message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698