| Index: base/process_util_mac.mm
|
| diff --git a/base/process_util_mac.mm b/base/process_util_mac.mm
|
| index 4885e4b18c6135ea08b1311eca24c1b0919ebd88..be17a1d56c0bae2a218c92bbba118bb60a906dcc 100644
|
| --- a/base/process_util_mac.mm
|
| +++ b/base/process_util_mac.mm
|
| @@ -34,6 +34,7 @@
|
| #include "base/lazy_instance.h"
|
| #include "base/logging.h"
|
| #include "base/mac/mac_util.h"
|
| +#include "base/mac/scoped_mach_port.h"
|
| #include "base/string_util.h"
|
| #include "base/sys_info.h"
|
| #include "base/threading/thread_local.h"
|
| @@ -468,7 +469,7 @@ mach_port_t ProcessMetrics::TaskForPid(ProcessHandle process) const {
|
|
|
| // Bytes committed by the system.
|
| size_t GetSystemCommitCharge() {
|
| - host_name_port_t host = mach_host_self();
|
| + base::mac::ScopedMachPort<host_name_port_t> host(mach_host_self());
|
| mach_msg_type_number_t count = HOST_VM_INFO_COUNT;
|
| vm_statistics_data_t data;
|
| kern_return_t kr = host_statistics(host, HOST_VM_INFO,
|
|
|