| Index: util/mach/mach_extensions.h
|
| diff --git a/util/mach/mach_extensions.h b/util/mach/mach_extensions.h
|
| index 4f2861bf6446e2be186e3c6bc31956e970aa1c3b..c8753035dcf22873f02328cc20b300960fa241b8 100644
|
| --- a/util/mach/mach_extensions.h
|
| +++ b/util/mach/mach_extensions.h
|
| @@ -17,6 +17,8 @@
|
|
|
| #include <mach/mach.h>
|
|
|
| +#include "base/mac/scoped_mach_port.h"
|
| +
|
| namespace crashpad {
|
|
|
| //! \brief `MACH_PORT_NULL` with the correct type for a Mach port,
|
| @@ -115,6 +117,20 @@ exception_mask_t ExcMaskAll();
|
| //! support is present.
|
| exception_mask_t ExcMaskValid();
|
|
|
| +//! \brief Obtains the system’s default Mach exception handler for crash-type
|
| +//! exceptions.
|
| +//!
|
| +//! This is obtained by looking up `"com.apple.ReportCrash"` with the bootstrap
|
| +//! server. The service name comes from the first launch agent loaded by
|
| +//! `launchd` with a `MachServices` entry having `ExceptionServer` set. This
|
| +//! launch agent is normally loaded from
|
| +//! `/System/Library/LaunchAgents/com.apple.ReportCrash.plist`.
|
| +//!
|
| +//! \return On success, a send right to an `exception_handler_t` corresponding
|
| +//! to the system’s default crash reporter. On failure, `MACH_PORT_NULL`,
|
| +//! with a message logged.
|
| +base::mac::ScopedMachSendRight SystemCrashReporterHandler();
|
| +
|
| } // namespace crashpad
|
|
|
| #endif // CRASHPAD_UTIL_MACH_MACH_EXTENSIONS_H_
|
|
|