Index: ipc/mojo/ipc_mojo_message_helper.cc |
diff --git a/ipc/mojo/ipc_mojo_message_helper.cc b/ipc/mojo/ipc_mojo_message_helper.cc |
index 8b8344ec766c514d2a4a1c8bce92f5ca05739c66..ae5e83a2cdb12e54c5807b967217e83d40dfbb17 100644 |
--- a/ipc/mojo/ipc_mojo_message_helper.cc |
+++ b/ipc/mojo/ipc_mojo_message_helper.cc |
@@ -12,7 +12,7 @@ namespace IPC { |
// static |
bool MojoMessageHelper::WriteMessagePipeTo( |
- Message* message, |
+ base::Pickle* message, |
mojo::ScopedMessagePipeHandle handle) { |
message->WriteAttachment(new internal::MojoHandleAttachment( |
mojo::ScopedHandle::From(std::move(handle)))); |
@@ -21,17 +21,19 @@ bool MojoMessageHelper::WriteMessagePipeTo( |
// static |
bool MojoMessageHelper::ReadMessagePipeFrom( |
- const Message* message, |
+ const base::Pickle* message, |
base::PickleIterator* iter, |
mojo::ScopedMessagePipeHandle* handle) { |
- scoped_refptr<MessageAttachment> attachment; |
+ scoped_refptr<base::Pickle::Attachment> attachment; |
if (!message->ReadAttachment(iter, &attachment)) { |
LOG(ERROR) << "Failed to read attachment for message pipe."; |
return false; |
} |
- if (attachment->GetType() != MessageAttachment::TYPE_MOJO_HANDLE) { |
- LOG(ERROR) << "Unxpected attachment type:" << attachment->GetType(); |
+ MessageAttachment::Type type = |
+ static_cast<MessageAttachment*>(attachment.get())->GetType(); |
+ if (type != MessageAttachment::TYPE_MOJO_HANDLE) { |
+ LOG(ERROR) << "Unxpected attachment type:" << type; |
return false; |
} |