From 4e368f8199a61c6319621ad1b9d6c352f0319f41 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 30 Mar 2018 08:50:58 +0200 Subject: Remove base conditional code for crash reporter and injector. --- dom/ipc/ContentParent.cpp | 71 ----------------------------------------------- 1 file changed, 71 deletions(-) (limited to 'dom/ipc/ContentParent.cpp') diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index ff40db8d7..73621df22 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -249,10 +249,6 @@ using namespace mozilla::system; #include "mozilla/widget/AudioSession.h" #endif -#ifdef MOZ_CRASHREPORTER -#include "nsThread.h" -#endif - #ifdef ACCESSIBILITY #include "nsAccessibilityService.h" #endif @@ -273,9 +269,6 @@ using base::KillProcess; using mozilla::ProfileGatherer; #endif -#ifdef MOZ_CRASHREPORTER -using namespace CrashReporter; -#endif using namespace mozilla::dom::power; using namespace mozilla::media; using namespace mozilla::embedding; @@ -1847,36 +1840,6 @@ ContentParent::ActorDestroy(ActorDestroyReason why) NS_LITERAL_CSTRING("content"), 1); props->SetPropertyAsBool(NS_LITERAL_STRING("abnormal"), true); - -#ifdef MOZ_CRASHREPORTER - // There's a window in which child processes can crash - // after IPC is established, but before a crash reporter - // is created. - if (PCrashReporterParent* p = LoneManagedOrNullAsserts(ManagedPCrashReporterParent())) { - CrashReporterParent* crashReporter = - static_cast(p); - - // If we're an app process, always stomp the latest URI - // loaded in the child process with our manifest URL. We - // would rather associate the crashes with apps than - // random child windows loaded in them. - // - // XXX would be nice if we could get both ... - if (!mAppManifestURL.IsEmpty()) { - crashReporter->AnnotateCrashReport(NS_LITERAL_CSTRING("URL"), - NS_ConvertUTF16toUTF8(mAppManifestURL)); - } - - // if mCreatedPairedMinidumps is true, we've already generated - // parent/child dumps for dekstop crashes. - if (!mCreatedPairedMinidumps) { - crashReporter->GenerateCrashReport(this, nullptr); - } - - nsAutoString dumpID(crashReporter->ChildDumpID()); - props->SetPropertyAsAString(NS_LITERAL_STRING("dumpID"), dumpID); - } -#endif } nsAutoString cpId; cpId.AppendInt(static_cast(this->ChildID())); @@ -3090,33 +3053,6 @@ ContentParent::KillHard(const char* aReason) mCalledKillHard = true; mForceKillTimer = nullptr; -#if defined(MOZ_CRASHREPORTER) && !defined(MOZ_B2G) - // We're about to kill the child process associated with this content. - // Something has gone wrong to get us here, so we generate a minidump - // of the parent and child for submission to the crash server. - if (PCrashReporterParent* p = LoneManagedOrNullAsserts(ManagedPCrashReporterParent())) { - CrashReporterParent* crashReporter = - static_cast(p); - // GeneratePairedMinidump creates two minidumps for us - the main - // one is for the content process we're about to kill, and the other - // one is for the main browser process. That second one is the extra - // minidump tagging along, so we have to tell the crash reporter that - // it exists and is being appended. - nsAutoCString additionalDumps("browser"); - crashReporter->AnnotateCrashReport( - NS_LITERAL_CSTRING("additional_minidumps"), - additionalDumps); - nsDependentCString reason(aReason); - crashReporter->AnnotateCrashReport( - NS_LITERAL_CSTRING("ipc_channel_error"), - reason); - - // Generate the report and insert into the queue for submittal. - mCreatedPairedMinidumps = crashReporter->GenerateCompleteMinidump(this); - - Telemetry::Accumulate(Telemetry::SUBPROCESS_KILL_HARD, reason, 1); - } -#endif ProcessHandle otherProcessHandle; if (!base::OpenProcessHandle(OtherPid(), &otherProcessHandle)) { NS_ERROR("Failed to open child process when attempting kill."); @@ -3168,11 +3104,7 @@ PCrashReporterParent* ContentParent::AllocPCrashReporterParent(const NativeThreadId& tid, const uint32_t& processType) { -#ifdef MOZ_CRASHREPORTER - return new CrashReporterParent(); -#else return nullptr; -#endif } bool @@ -5001,9 +4933,6 @@ ContentParent::RecvNotifyPushSubscriptionModifiedObservers(const nsCString& aSco bool ContentParent::RecvNotifyLowMemory() { -#ifdef MOZ_CRASHREPORTER - nsThread::SaveMemoryReportNearOOM(nsThread::ShouldSaveMemoryReport::kForceReport); -#endif return true; } -- cgit v1.2.3