diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-03-30 08:50:58 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-03-30 08:50:58 +0200 |
commit | 4e368f8199a61c6319621ad1b9d6c352f0319f41 (patch) | |
tree | 69c6e2296c4e183ecbe6cfd1e856619e3715ae01 /dom/ipc/ContentParent.cpp | |
parent | 59bf4204a84f7638d3f89a29bc7c04e5dc401369 (diff) | |
download | UXP-4e368f8199a61c6319621ad1b9d6c352f0319f41.tar UXP-4e368f8199a61c6319621ad1b9d6c352f0319f41.tar.gz UXP-4e368f8199a61c6319621ad1b9d6c352f0319f41.tar.lz UXP-4e368f8199a61c6319621ad1b9d6c352f0319f41.tar.xz UXP-4e368f8199a61c6319621ad1b9d6c352f0319f41.zip |
Remove base conditional code for crash reporter and injector.
Diffstat (limited to 'dom/ipc/ContentParent.cpp')
-rw-r--r-- | dom/ipc/ContentParent.cpp | 71 |
1 files changed, 0 insertions, 71 deletions
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<CrashReporterParent*>(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<uint64_t>(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<CrashReporterParent*>(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; } |