Index: base/mac/scoped_mach_port.cc |
diff --git a/base/mac/scoped_mach_port.cc b/base/mac/scoped_mach_port.cc |
index de94602e36ed4995dac2b1bbab40654208f73c11..13307f2c9d2557d2d858c36791a1b616eb306616 100644 |
--- a/base/mac/scoped_mach_port.cc |
+++ b/base/mac/scoped_mach_port.cc |
@@ -25,6 +25,14 @@ void ReceiveRightTraits::Free(mach_port_t port) { |
<< "ScopedMachReceiveRight mach_port_mod_refs"; |
} |
+// static |
+void PortSetTraits::Free(mach_port_t port) { |
+ kern_return_t kr = |
+ mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_PORT_SET, -1); |
+ MACH_LOG_IF(ERROR, kr != KERN_SUCCESS, kr) |
+ << "ScopedMachPortSet mach_port_mod_refs"; |
+} |
+ |
} // namespace internal |
} // namespace mac |
} // namespace base |