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

Unified Diff: client/crashpad_client.h

Issue 1375573005: mac: Add CrashpadClient::UseSystemDefaultHandler() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 5 years, 2 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 | « no previous file | client/crashpad_client_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/crashpad_client.h
diff --git a/client/crashpad_client.h b/client/crashpad_client.h
index 7095de0403e68f0edcc780e3bd66e84ddc110b90..9ed2aea5ea45f8442eebcdaf3d0b8c1966ced274 100644
--- a/client/crashpad_client.h
+++ b/client/crashpad_client.h
@@ -122,6 +122,30 @@ class CrashpadClient {
//! \return `true` on success, `false` on failure with a message logged.
bool UseHandler();
+#if defined(OS_MACOSX) || DOXYGEN
+ //! \brief Configures the process to direct its crashes to the default handler
+ //! for the operating system.
+ //!
+ //! On OS X, this sets the task’s exception port as in UseHandler(), but the
+ //! exception handler used is obtained from SystemCrashReporterHandler(). If
+ //! the system’s crash reporter handler cannot be determined, the task’s
+ //! exception ports for crash-type exceptions are cleared.
+ //!
+ //! Use of this function is strongly discouraged.
+ //!
+ //! \warning After a successful call to this function, Crashpad will no longer
+ //! monitor the process for crashes until a subsequent call to
+ //! UseHandler().
+ //!
+ //! \note This is provided as a static function to allow it to be used in
+ //! situations where a CrashpadClient object is not otherwise available.
+ //! This may be useful when a child process inherits its parent’s Crashpad
+ //! handler, but wants to sever this tie.
+ //!
+ //! \return `true` on success, `false` on failure with a message logged.
+ static bool UseSystemDefaultHandler();
+#endif
+
private:
#if defined(OS_MACOSX)
base::mac::ScopedMachSendRight exception_port_;
« no previous file with comments | « no previous file | client/crashpad_client_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698