Commit d768626a authored by Gabriele Svelto's avatar Gabriele Svelto
Browse files

Bug 1868772 - Do not launch the crash reporter client if we've already removed...

Bug 1868772 - Do not launch the crash reporter client if we've already removed the exception handler. r=afranchuk, a=RyanVM

Differential Revision: https://phabricator.services.mozilla.com/D198158
parent a807e3f1
Loading
Loading
Loading
Loading
+11 −12
Original line number Diff line number Diff line
@@ -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);
#else  // Windows, Mac, Linux, etc...
    returnValue = LaunchProgram(crashReporterPath.c_str(), minidumpPath);
#endif
  }

#ifdef XP_WIN
  TerminateProcess(GetCurrentProcess(), 1);
#  endif
#endif

  return returnValue;