summaryrefslogtreecommitdiffstats
path: root/ipc/glue/ProtocolUtils.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-03-30 08:50:58 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-03-30 08:50:58 +0200
commit4e368f8199a61c6319621ad1b9d6c352f0319f41 (patch)
tree69c6e2296c4e183ecbe6cfd1e856619e3715ae01 /ipc/glue/ProtocolUtils.cpp
parent59bf4204a84f7638d3f89a29bc7c04e5dc401369 (diff)
downloadUXP-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 'ipc/glue/ProtocolUtils.cpp')
-rw-r--r--ipc/glue/ProtocolUtils.cpp67
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