mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1460022: Part 10 - Update crash reporter to work with revised DLL interceptor interface; r=dmajor
This commit is contained in:
parent
fab8ec82c6
commit
c710bd6ee2
@ -338,7 +338,8 @@ nsTArray<nsAutoPtr<DelayedNote> >* gDelayedAnnotations;
|
|||||||
// reporter is loaded instead (in case it became unloaded somehow)
|
// reporter is loaded instead (in case it became unloaded somehow)
|
||||||
typedef LPTOP_LEVEL_EXCEPTION_FILTER (WINAPI *SetUnhandledExceptionFilter_func)
|
typedef LPTOP_LEVEL_EXCEPTION_FILTER (WINAPI *SetUnhandledExceptionFilter_func)
|
||||||
(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter);
|
(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter);
|
||||||
static SetUnhandledExceptionFilter_func stub_SetUnhandledExceptionFilter = 0;
|
static WindowsDllInterceptor::FuncHookType<SetUnhandledExceptionFilter_func>
|
||||||
|
stub_SetUnhandledExceptionFilter;
|
||||||
static LPTOP_LEVEL_EXCEPTION_FILTER previousUnhandledExceptionFilter = nullptr;
|
static LPTOP_LEVEL_EXCEPTION_FILTER previousUnhandledExceptionFilter = nullptr;
|
||||||
static WindowsDllInterceptor gKernel32Intercept;
|
static WindowsDllInterceptor gKernel32Intercept;
|
||||||
static bool gBlockUnhandledExceptionFilter = true;
|
static bool gBlockUnhandledExceptionFilter = true;
|
||||||
@ -1639,9 +1640,9 @@ nsresult SetExceptionHandler(nsIFile* aXREDirectory,
|
|||||||
// protect the crash reporter from being unloaded
|
// protect the crash reporter from being unloaded
|
||||||
gBlockUnhandledExceptionFilter = true;
|
gBlockUnhandledExceptionFilter = true;
|
||||||
gKernel32Intercept.Init("kernel32.dll");
|
gKernel32Intercept.Init("kernel32.dll");
|
||||||
bool ok = gKernel32Intercept.AddHook("SetUnhandledExceptionFilter",
|
bool ok = stub_SetUnhandledExceptionFilter.Set(gKernel32Intercept,
|
||||||
reinterpret_cast<intptr_t>(patched_SetUnhandledExceptionFilter),
|
"SetUnhandledExceptionFilter",
|
||||||
(void**) &stub_SetUnhandledExceptionFilter);
|
&patched_SetUnhandledExceptionFilter);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (!ok)
|
if (!ok)
|
||||||
|
Loading…
Reference in New Issue
Block a user