| Index: base/mac/scoped_mach_port.cc
|
| diff --git a/base/mac/scoped_mach_port.cc b/base/mac/scoped_mach_port.cc
|
| index 13307f2c9d2557d2d858c36791a1b616eb306616..52f7dc9758cec6ece35beed8ba221b708573e06e 100644
|
| --- a/base/mac/scoped_mach_port.cc
|
| +++ b/base/mac/scoped_mach_port.cc
|
| @@ -33,6 +33,24 @@ void PortSetTraits::Free(mach_port_t port) {
|
| << "ScopedMachPortSet mach_port_mod_refs";
|
| }
|
|
|
| +// static
|
| +void RefCountedSendRighTraits::Retain(mach_port_t port) {
|
| + kern_return_t kr =
|
| + mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_SEND, 1);
|
| +
|
| + MACH_LOG_IF(ERROR, kr != KERN_SUCCESS, kr)
|
| + << "RefCountedSendRighTraits::Retain mach_port_mod_refs";
|
| +}
|
| +
|
| +// static
|
| +void RefCountedSendRighTraits::Release(mach_port_t port) {
|
| + kern_return_t kr =
|
| + mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_SEND, -1);
|
| +
|
| + MACH_LOG_IF(ERROR, kr != KERN_SUCCESS, kr)
|
| + << "RefCountedSendRighTraits::Release mach_port_mod_refs";
|
| +}
|
| +
|
| } // namespace internal
|
| } // namespace mac
|
| } // namespace base
|
|
|