summaryrefslogtreecommitdiffstats
path: root/toolkit/crashreporter
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/crashreporter')
-rw-r--r--toolkit/crashreporter/nsExceptionHandler.cpp23
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;