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

Unified Diff: base/mac/scoped_mach_port.cc

Issue 13845008: [Mac] Remove base::LaunchSynchronize and rewrite content::MachBroker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix link_settings Created 7 years, 8 months 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/process_util.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 652e3f44852161b4f69e0754855b1de93451e2c6..9e45a856a8cf8b38662def3c761f8e05743c17d5 100644
--- a/base/mac/scoped_mach_port.cc
+++ b/base/mac/scoped_mach_port.cc
@@ -11,9 +11,14 @@ ScopedMachPort::ScopedMachPort(mach_port_t port) : port_(port) {
}
ScopedMachPort::~ScopedMachPort() {
+ reset();
+}
+
+void ScopedMachPort::reset(mach_port_t port) {
if (port_ != MACH_PORT_NULL) {
mach_port_deallocate(mach_task_self(), port_);
}
+ port_ = port;
}
} // namespace mac
« no previous file with comments | « base/mac/scoped_mach_port.h ('k') | base/process_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698