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

Unified Diff: third_party/crashpad/crashpad/client/crashpad_client.h

Issue 2754553002: Update Crashpad to 18d70acf81df49cc10b00bcc67c1ec64e16bd9d0 (Closed)
Patch Set: Created 3 years, 9 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 | « third_party/crashpad/crashpad/DEPS ('k') | third_party/crashpad/crashpad/client/crashpad_client_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/crashpad/crashpad/client/crashpad_client.h
diff --git a/third_party/crashpad/crashpad/client/crashpad_client.h b/third_party/crashpad/crashpad/client/crashpad_client.h
index f6f3395ca7e6d39fe001b808aa0ad6ff969738d7..7799bd9c9f1fdd4f19c59263fae5844ab4026292 100644
--- a/third_party/crashpad/crashpad/client/crashpad_client.h
+++ b/third_party/crashpad/crashpad/client/crashpad_client.h
@@ -132,6 +132,27 @@ class CrashpadClient {
//!
//! \return `true` on success, `false` on failure with a message logged.
bool SetHandlerMachPort(base::mac::ScopedMachSendRight exception_port);
+
+ //! \brief Retrieves a send right to the process’ crash handler Mach port.
+ //!
+ //! This method is only defined on macOS.
+ //!
+ //! This method can be used to obtain the crash handler Mach port when a
+ //! Crashpad client process wishes to provide a send right to this port to
+ //! another process. The IPC mechanism used to convey the right is under the
+ //! application’s control. If the other process wishes to become a client of
+ //! the same crash handler, it can provide the transferred right to
+ //! SetHandlerMachPort().
+ //!
+ //! See StartHandler() for more detail on how the port and handler are
+ //! configured.
+ //!
+ //! \return The Mach port set by SetHandlerMachPort(), possibly indirectly by
+ //! a call to another method such as StartHandler() or
+ //! SetHandlerMachService(). This method must only be called after a
+ //! successful call to one of those methods. `MACH_PORT_NULL` on failure
+ //! with a message logged.
+ base::mac::ScopedMachSendRight GetHandlerMachPort() const;
#endif
#if defined(OS_WIN) || DOXYGEN
@@ -155,14 +176,15 @@ class CrashpadClient {
//! \brief Retrieves the IPC pipe name used to register with the Crashpad
//! handler.
//!
+ //! This method is only defined on Windows.
+ //!
//! This method retrieves the IPC pipe name set by SetHandlerIPCPipe(), or a
- //! suitable IPC pipe name chosen by StartHandler(). It is intended to be used
+ //! suitable IPC pipe name chosen by StartHandler(). It must only be called
+ //! after a successful call to one of those methods. It is intended to be used
//! to obtain the IPC pipe name so that it may be passed to other processes,
//! so that they may register with an existing Crashpad handler by calling
//! SetHandlerIPCPipe().
//!
- //! This method is only defined on Windows.
- //!
//! \return The full name of the crash handler IPC pipe, a string of the form
//! `"\\.\pipe\NAME"`.
std::wstring GetHandlerIPCPipe() const;
@@ -257,10 +279,12 @@ class CrashpadClient {
#endif
private:
-#if defined(OS_WIN)
+#if defined(OS_MACOSX)
+ base::mac::ScopedMachSendRight exception_port_;
+#elif defined(OS_WIN)
std::wstring ipc_pipe_;
ScopedKernelHANDLE handler_start_thread_;
-#endif
+#endif // OS_MACOSX
DISALLOW_COPY_AND_ASSIGN(CrashpadClient);
};
« no previous file with comments | « third_party/crashpad/crashpad/DEPS ('k') | third_party/crashpad/crashpad/client/crashpad_client_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698