Bug 1138520 follow-up: Fix the build bustage on configurations that disable the crash reporter

This commit is contained in:
Ehsan Akhgari 2015-04-14 22:56:08 -04:00
parent 4530d75a37
commit b625414eed

View File

@ -1881,8 +1881,10 @@ struct DelayedDeleteContentParentTask : public nsRunnable
void void
ContentParent::ActorDestroy(ActorDestroyReason why) ContentParent::ActorDestroy(ActorDestroyReason why)
{ {
#ifdef MOZ_CRASHREPORTER
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("ChildShutdownState"), CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("ChildShutdownState"),
NS_LITERAL_CSTRING("ActorDestroy")); NS_LITERAL_CSTRING("ActorDestroy"));
#endif
if (mForceKillTimer) { if (mForceKillTimer) {
mForceKillTimer->Cancel(); mForceKillTimer->Cancel();
@ -2890,8 +2892,10 @@ ContentParent::Observe(nsISupports* aSubject,
{ {
if (mSubprocess && (!strcmp(aTopic, "profile-before-change") || if (mSubprocess && (!strcmp(aTopic, "profile-before-change") ||
!strcmp(aTopic, "xpcom-shutdown"))) { !strcmp(aTopic, "xpcom-shutdown"))) {
#ifdef MOZ_CRASHREPORTER
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("ChildShutdownState"), CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("ChildShutdownState"),
NS_LITERAL_CSTRING("Begin")); NS_LITERAL_CSTRING("Begin"));
#endif
// Okay to call ShutDownProcess multiple times. // Okay to call ShutDownProcess multiple times.
ShutDownProcess(SEND_SHUTDOWN_MESSAGE); ShutDownProcess(SEND_SHUTDOWN_MESSAGE);
@ -3355,8 +3359,10 @@ ContentParent::ForceKillTimerCallback(nsITimer* aTimer, void* aClosure)
void void
ContentParent::KillHard(const char* aReason) ContentParent::KillHard(const char* aReason)
{ {
#ifdef MOZ_CRASHREPORTER
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("ChildShutdownState"), CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("ChildShutdownState"),
NS_LITERAL_CSTRING("KillHard")); NS_LITERAL_CSTRING("KillHard"));
#endif
// On Windows, calling KillHard multiple times causes problems - the // On Windows, calling KillHard multiple times causes problems - the
// process handle becomes invalid on the first call, causing a second call // process handle becomes invalid on the first call, causing a second call