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

Unified Diff: chrome/common/ipc_message_utils.h

Issue 112042: Prevent an extra copy of data types that get passed into IPC messages when... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « chrome/common/ipc_message_macros.h ('k') | chrome/common/resource_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/ipc_message_utils.h
===================================================================
--- chrome/common/ipc_message_utils.h (revision 16437)
+++ chrome/common/ipc_message_utils.h (working copy)
@@ -1061,8 +1061,9 @@
class MessageWithTuple : public Message {
public:
typedef ParamType Param;
+ typedef typename ParamType::ParamTuple RefParam;
- MessageWithTuple(int32 routing_id, uint16 type, const Param& p)
+ MessageWithTuple(int32 routing_id, uint16 type, const RefParam& p)
: Message(routing_id, type, PRIORITY_NORMAL) {
WriteParam(this, p);
}
@@ -1093,7 +1094,7 @@
void (T::*func)(const Message&, TA)) {
Param p;
if (Read(msg, &p)) {
- (obj->*func)(*msg, p);
+ (obj->*func)(*msg, p.a);
return true;
}
return false;
@@ -1222,10 +1223,11 @@
class MessageWithReply : public SyncMessage {
public:
typedef SendParamType SendParam;
+ typedef typename SendParam::ParamTuple RefSendParam;
typedef ReplyParamType ReplyParam;
MessageWithReply(int32 routing_id, uint16 type,
- const SendParam& send, const ReplyParam& reply)
+ const RefSendParam& send, const ReplyParam& reply)
: SyncMessage(routing_id, type, PRIORITY_NORMAL,
new ParamDeserializer<ReplyParam>(reply)) {
WriteParam(this, send);
« no previous file with comments | « chrome/common/ipc_message_macros.h ('k') | chrome/common/resource_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698