diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:11:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:11:26 +0000 |
commit | fcea19dfd2c426bac0456da850e7c12258e4b9eb (patch) | |
tree | a31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /toolkit/crashreporter/nsExceptionHandler.cpp | |
parent | Adding upstream version 115.7.0esr. (diff) | |
download | firefox-esr-fcea19dfd2c426bac0456da850e7c12258e4b9eb.tar.xz firefox-esr-fcea19dfd2c426bac0456da850e7c12258e4b9eb.zip |
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/crashreporter/nsExceptionHandler.cpp')
-rw-r--r-- | toolkit/crashreporter/nsExceptionHandler.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/toolkit/crashreporter/nsExceptionHandler.cpp b/toolkit/crashreporter/nsExceptionHandler.cpp index aca9248147..534f5ab48c 100644 --- a/toolkit/crashreporter/nsExceptionHandler.cpp +++ b/toolkit/crashreporter/nsExceptionHandler.cpp @@ -1532,21 +1532,20 @@ bool MinidumpCallback( WriteAnnotationsForMainProcessCrash(apiData, addrInfo, crashTime); } - if (!doReport) { -#ifdef XP_WIN - TerminateProcess(GetCurrentProcess(), 1); -#endif // XP_WIN - return returnValue; - } - + if (doReport && isSafeToDump) { + // We launch the crash reporter client/dialog only if we've been explicitly + // asked to report crashes and if we weren't already trying to unset the + // exception handler (which is indicated by isSafeToDump being false). #if defined(MOZ_WIDGET_ANDROID) // Android - returnValue = - LaunchCrashHandlerService(crashReporterPath.c_str(), minidumpPath); + returnValue = + LaunchCrashHandlerService(crashReporterPath.c_str(), minidumpPath); #else // Windows, Mac, Linux, etc... - returnValue = LaunchProgram(crashReporterPath.c_str(), minidumpPath); -# ifdef XP_WIN + returnValue = LaunchProgram(crashReporterPath.c_str(), minidumpPath); +#endif + } + +#ifdef XP_WIN TerminateProcess(GetCurrentProcess(), 1); -# endif #endif return returnValue; |