Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2150)

Unified Diff: base/mac/scoped_mach_port.cc

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/mac/scoped_mach_port.h ('k') | base/macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « base/mac/scoped_mach_port.h ('k') | base/macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698