Introduce SetFirstChanceHandler with more strict signature

Eventually, I want to remove the current version of
SetFirstChanceHandler. That is why I changed the name of the current
callback type to FirstChanceHandlerDeprecated.

I also made sure that it is not possible to have two different
FirstChanceHandlers set at the same time.

This is the first of a set of CLs to clean up the API between Chrome,
BreakPad, and V8. See more information in the tracking bug.

R=mark@chromium.org

Bug: chromium:921971
Change-Id: Ia8c2fd9bd875c36dd7ae8bb4a02e538556bc67a1
Reviewed-on: https://chromium-review.googlesource.com/c/1411776
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Andreas Haas 2019-01-15 15:15:14 +01:00 committed by Mark Mentovai
parent b988fa74ec
commit 9b06049ed9
3 changed files with 40 additions and 3 deletions

View file

@ -273,10 +273,14 @@ class ExceptionHandler {
AppMemoryList app_memory_list_;
};
typedef bool (*FirstChanceHandler)(int, void*, void*);
typedef bool (*FirstChanceHandler)(int, siginfo_t*, void*);
void SetFirstChanceExceptionHandler(FirstChanceHandler callback);
typedef bool (*FirstChanceHandlerDeprecated)(int, void*, void*);
// Deprecated. Use SetFirstChanceExceptionHandler(FirstChanceHandler callback)
// instead.
void SetFirstChanceExceptionHandler(FirstChanceHandlerDeprecated callback);
} // namespace google_breakpad
#endif // CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_