From 1628d99f7b21b6920ac8bf197b2acd38021f1df9 Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Mon, 19 Jun 2017 10:06:28 -0700 Subject: Add first chance exception handler API This change adds the option for Breakpad hosts to register a callback that gets the first chance to handle an exception. The handler will return true if it handled the exception and false otherwise. The primary use case is V8's trap-based bounds checking support for WebAssembly. Bug: Change-Id: I5aa5b87d1229f1cef905a00404fa2027ee86be56 Reviewed-on: https://chromium-review.googlesource.com/509994 Reviewed-by: Mark Mentovai --- src/client/linux/handler/exception_handler.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/client/linux/handler/exception_handler.h') diff --git a/src/client/linux/handler/exception_handler.h b/src/client/linux/handler/exception_handler.h index 591c3108..daba57e0 100644 --- a/src/client/linux/handler/exception_handler.h +++ b/src/client/linux/handler/exception_handler.h @@ -273,6 +273,10 @@ class ExceptionHandler { AppMemoryList app_memory_list_; }; + +typedef bool (*FirstChanceHandler)(int, void*, void*); +void SetFirstChanceExceptionHandler(FirstChanceHandler callback); + } // namespace google_breakpad #endif // CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_ -- cgit v1.2.1