| Index: ipc/handle_win.cc
|
| diff --git a/ipc/handle_win.cc b/ipc/handle_win.cc
|
| index c8511e2017387ac523f238f6c8c76dae04f8c90d..60fa54c7cd1643cd08a3ed8093ab7d02d4f4e7b7 100644
|
| --- a/ipc/handle_win.cc
|
| +++ b/ipc/handle_win.cc
|
| @@ -38,10 +38,16 @@
|
| return false;
|
| MessageAttachment* attachment =
|
| static_cast<MessageAttachment*>(base_attachment.get());
|
| - if (attachment->GetType() != MessageAttachment::Type::WIN_HANDLE)
|
| + if (attachment->GetType() != MessageAttachment::TYPE_BROKERABLE_ATTACHMENT)
|
| return false;
|
| + BrokerableAttachment* brokerable_attachment =
|
| + static_cast<BrokerableAttachment*>(attachment);
|
| + if (brokerable_attachment->GetBrokerableType() !=
|
| + BrokerableAttachment::WIN_HANDLE) {
|
| + return false;
|
| + }
|
| IPC::internal::HandleAttachmentWin* handle_attachment =
|
| - static_cast<IPC::internal::HandleAttachmentWin*>(attachment);
|
| + static_cast<IPC::internal::HandleAttachmentWin*>(brokerable_attachment);
|
| r->set_handle(handle_attachment->get_handle());
|
| handle_attachment->reset_handle_ownership();
|
| return true;
|
|
|