win: Check that UseHandler() has been called in DumpAndCrash()

Change-Id: I16ee8bf4ccb54a26dfd35551ab1ea1be838a9207
Reviewed-on: https://chromium-review.googlesource.com/337300
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Scott Graham 2016-04-05 13:18:30 -07:00
parent 12536e06e5
commit 1fe622550d

View File

@ -461,6 +461,11 @@ void CrashpadClient::DumpWithoutCrash(const CONTEXT& context) {
// static // static
void CrashpadClient::DumpAndCrash(EXCEPTION_POINTERS* exception_pointers) { void CrashpadClient::DumpAndCrash(EXCEPTION_POINTERS* exception_pointers) {
if (g_signal_exception == INVALID_HANDLE_VALUE) {
LOG(ERROR) << "haven't called UseHandler()";
return;
}
UnhandledExceptionHandler(exception_pointers); UnhandledExceptionHandler(exception_pointers);
} }