diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-04-11 17:46:17 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-04-11 17:47:35 +0200 |
commit | 0e01190d5f63559ab519774a79b2adaa17382df9 (patch) | |
tree | 6adbe3cfb37ec4fca51003633bea9334f4822be5 /ipc/glue/ProtocolUtils.cpp | |
parent | ac05ab923af8bc5b0c077fe3a271492af19dbea8 (diff) | |
parent | 597fb9fbe387378185431e1900ebe6f05ca09fbf (diff) | |
download | UXP-0e01190d5f63559ab519774a79b2adaa17382df9.tar UXP-0e01190d5f63559ab519774a79b2adaa17382df9.tar.gz UXP-0e01190d5f63559ab519774a79b2adaa17382df9.tar.lz UXP-0e01190d5f63559ab519774a79b2adaa17382df9.tar.xz UXP-0e01190d5f63559ab519774a79b2adaa17382df9.zip |
Remove crash reporter part 1.
Merged branch 'remove-crashreporter'
Diffstat (limited to 'ipc/glue/ProtocolUtils.cpp')
-rw-r--r-- | ipc/glue/ProtocolUtils.cpp | 67 |
1 files changed, 1 insertions, 66 deletions
diff --git a/ipc/glue/ProtocolUtils.cpp b/ipc/glue/ProtocolUtils.cpp index 1a022048f..4de131469 100644 --- a/ipc/glue/ProtocolUtils.cpp +++ b/ipc/glue/ProtocolUtils.cpp @@ -25,13 +25,6 @@ #include "mozilla/sandboxTarget.h" #endif -#if defined(MOZ_CRASHREPORTER) && defined(XP_WIN) -#include "aclapi.h" -#include "sddl.h" - -#include "mozilla/TypeTraits.h" -#endif - #include "nsAutoPtr.h" using namespace IPC; @@ -42,16 +35,6 @@ using base::ProcessId; namespace mozilla { -#if defined(MOZ_CRASHREPORTER) && defined(XP_WIN) -// Generate RAII classes for LPTSTR and PSECURITY_DESCRIPTOR. -MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedLPTStr, \ - RemovePointer<LPTSTR>::Type, \ - ::LocalFree) -MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedPSecurityDescriptor, \ - RemovePointer<PSECURITY_DESCRIPTOR>::Type, \ - ::LocalFree) -#endif - namespace ipc { class ChannelOpened : public IPC::Message @@ -195,11 +178,6 @@ bool DuplicateHandle(HANDLE aSourceHandle, FALSE, aTargetProcessId)); if (!targetProcess) { -#ifdef MOZ_CRASHREPORTER - CrashReporter::AnnotateCrashReport( - NS_LITERAL_CSTRING("IPCTransportFailureReason"), - NS_LITERAL_CSTRING("Failed to open target process.")); -#endif return false; } @@ -209,34 +187,6 @@ bool DuplicateHandle(HANDLE aSourceHandle, } #endif -#ifdef MOZ_CRASHREPORTER -void -AnnotateSystemError() -{ - int64_t error = 0; -#if defined(XP_WIN) - error = ::GetLastError(); -#elif defined(OS_POSIX) - error = errno; -#endif - if (error) { - CrashReporter::AnnotateCrashReport( - NS_LITERAL_CSTRING("IPCSystemError"), - nsPrintfCString("%lld", error)); - } -} -#endif - -#if defined(MOZ_CRASHREPORTER) && defined(XP_MACOSX) -void -AnnotateCrashReportWithErrno(const char* tag, int error) -{ - CrashReporter::AnnotateCrashReport( - nsCString(tag), - nsPrintfCString("%d", error)); -} -#endif - void LogMessageForProtocol(const char* aTopLevelProtocol, base::ProcessId aOtherPid, const char* aContextDescription, @@ -274,18 +224,6 @@ FatalError(const char* aProtocolName, const char* aMsg, bool aIsParent) formattedMessage.AppendLiteral("]: \""); formattedMessage.AppendASCII(aMsg); if (aIsParent) { -#ifdef MOZ_CRASHREPORTER - // We're going to crash the parent process because at this time - // there's no other really nice way of getting a minidump out of - // this process if we're off the main thread. - formattedMessage.AppendLiteral("\". Intentionally crashing."); - NS_ERROR(formattedMessage.get()); - CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("IPCFatalErrorProtocol"), - nsDependentCString(aProtocolName)); - CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("IPCFatalErrorMsg"), - nsDependentCString(aMsg)); - AnnotateSystemError(); -#endif MOZ_CRASH("IPC FatalError in the parent process!"); } else { formattedMessage.AppendLiteral("\". abort()ing as a result."); @@ -540,12 +478,9 @@ IToplevelProtocol::SetOtherProcessId(base::ProcessId aOtherPid) bool IToplevelProtocol::TakeMinidump(nsIFile** aDump, uint32_t* aSequence) { + /*** STUB ***/ MOZ_RELEASE_ASSERT(GetSide() == ParentSide); -#ifdef MOZ_CRASHREPORTER - return XRE_TakeMinidumpForChild(OtherPid(), aDump, aSequence); -#else return false; -#endif } bool |