mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 23:01:05 +08:00
5f7eda87a6
ExceptionPorts::GetExceptionPorts() returned a std::vector<ExceptionPorts::ExceptionHandler>, which contained send rights to Mach ports. The interface required callers to assume ownership of each send right contained within the vector. This was cumbersome and error-prone, and despite the care taken in Crashpad, port right leaks did occur: - SimulateCrash() didn’t make any attempt to release these resources at all. - Neither did crashpad_util_test ExceptionPorts.HostExceptionPorts, which also reused a vector. This replaces the vector with the interface-compatible (as far as necessary) ExceptionPorts::ExceptionHandlerVector, which deallocates collected port rights on destruction or clear(). R=rsesek@chromium.org Review URL: https://codereview.chromium.org/1381023007 .