| Index: ipc/handle_attachment_win.cc
|
| diff --git a/ipc/handle_attachment_win.cc b/ipc/handle_attachment_win.cc
|
| index b7f43734b5bc7500af56629432ed5ae3da547aec..50e3e6dab24310c5bba54d5f44cfa42cb436630e 100644
|
| --- a/ipc/handle_attachment_win.cc
|
| +++ b/ipc/handle_attachment_win.cc
|
| @@ -14,13 +14,13 @@
|
| : handle_(handle), permissions_(permissions) {}
|
|
|
| HandleAttachmentWin::HandleAttachmentWin(const WireFormat& wire_format)
|
| - : BrokerableAttachment(wire_format.attachment_id),
|
| + : BrokerableAttachment(wire_format.attachment_id, false),
|
| handle_(LongToHandle(wire_format.handle)),
|
| permissions_(wire_format.permissions) {}
|
|
|
| HandleAttachmentWin::HandleAttachmentWin(
|
| const BrokerableAttachment::AttachmentId& id)
|
| - : BrokerableAttachment(id),
|
| + : BrokerableAttachment(id, true),
|
| handle_(INVALID_HANDLE_VALUE),
|
| permissions_(HandleWin::INVALID) {}
|
|
|
| @@ -30,6 +30,19 @@
|
| HandleAttachmentWin::BrokerableType HandleAttachmentWin::GetBrokerableType()
|
| const {
|
| return WIN_HANDLE;
|
| +}
|
| +
|
| +void HandleAttachmentWin::PopulateWithAttachment(
|
| + const BrokerableAttachment* attachment) {
|
| + DCHECK(NeedsBrokering());
|
| + DCHECK(!attachment->NeedsBrokering());
|
| + DCHECK(GetIdentifier() == attachment->GetIdentifier());
|
| + DCHECK_EQ(GetBrokerableType(), attachment->GetBrokerableType());
|
| +
|
| + const HandleAttachmentWin* handle_attachment =
|
| + static_cast<const HandleAttachmentWin*>(attachment);
|
| + handle_ = handle_attachment->handle_;
|
| + SetNeedsBrokering(false);
|
| }
|
|
|
| HandleAttachmentWin::WireFormat HandleAttachmentWin::GetWireFormat(
|
|
|