summaryrefslogtreecommitdiffstats
path: root/xpcom/base
diff options
context:
space:
mode:
Diffstat (limited to 'xpcom/base')
-rw-r--r--xpcom/base/CycleCollectedJSContext.cpp26
-rw-r--r--xpcom/base/nsCrashOnException.cpp11
-rw-r--r--xpcom/base/nsCycleCollector.cpp12
-rw-r--r--xpcom/base/nsDebugImpl.cpp22
-rw-r--r--xpcom/base/nsObjCExceptions.h15
5 files changed, 0 insertions, 86 deletions
diff --git a/xpcom/base/CycleCollectedJSContext.cpp b/xpcom/base/CycleCollectedJSContext.cpp
index 87e123078..4af8fe4dd 100644
--- a/xpcom/base/CycleCollectedJSContext.cpp
+++ b/xpcom/base/CycleCollectedJSContext.cpp
@@ -82,10 +82,6 @@
#include "nsJSUtils.h"
#include "nsWrapperCache.h"
-#ifdef MOZ_CRASHREPORTER
-#include "nsExceptionHandler.h"
-#endif
-
#include "nsIException.h"
#include "nsIPlatformInfo.h"
#include "nsThread.h"
@@ -539,10 +535,6 @@ CycleCollectedJSContext::Initialize(JSContext* aParentContext,
JS_SetSweepZoneCallback(mJSContext, XPCStringConvert::ClearZoneCache);
JS::SetBuildIdOp(mJSContext, GetBuildId);
JS::SetWarningReporter(mJSContext, MozCrashWarningReporter);
-#ifdef MOZ_CRASHREPORTER
- js::AutoEnterOOMUnsafeRegion::setAnnotateOOMAllocationSizeCallback(
- CrashReporter::AnnotateOOMAllocationSize);
-#endif
static js::DOMCallbacks DOMcallbacks = {
InstanceClassHasProtoAtDepth
@@ -1607,16 +1599,6 @@ CycleCollectedJSContext::AnnotateAndSetOutOfMemory(OOMState* aStatePtr,
MOZ_ASSERT(mJSContext);
*aStatePtr = aNewState;
-#ifdef MOZ_CRASHREPORTER
- CrashReporter::AnnotateCrashReport(aStatePtr == &mOutOfMemoryState
- ? NS_LITERAL_CSTRING("JSOutOfMemory")
- : NS_LITERAL_CSTRING("JSLargeAllocationFailure"),
- aNewState == OOMState::Reporting
- ? NS_LITERAL_CSTRING("Reporting")
- : aNewState == OOMState::Reported
- ? NS_LITERAL_CSTRING("Reported")
- : NS_LITERAL_CSTRING("Recovered"));
-#endif
}
void
@@ -1630,14 +1612,6 @@ CycleCollectedJSContext::OnGC(JSGCStatus aStatus)
mZonesWaitingForGC.Clear();
break;
case JSGC_END: {
-#ifdef MOZ_CRASHREPORTER
- if (mOutOfMemoryState == OOMState::Reported) {
- AnnotateAndSetOutOfMemory(&mOutOfMemoryState, OOMState::Recovered);
- }
- if (mLargeAllocationFailureState == OOMState::Reported) {
- AnnotateAndSetOutOfMemory(&mLargeAllocationFailureState, OOMState::Recovered);
- }
-#endif
// Do any deferred finalization of native objects.
FinalizeDeferredThings(JS::WasIncrementalGC(mJSContext) ? FinalizeIncrementally :
diff --git a/xpcom/base/nsCrashOnException.cpp b/xpcom/base/nsCrashOnException.cpp
index 0f8042531..06c48738f 100644
--- a/xpcom/base/nsCrashOnException.cpp
+++ b/xpcom/base/nsCrashOnException.cpp
@@ -8,22 +8,11 @@
#include "nsCOMPtr.h"
#include "nsServiceManagerUtils.h"
-#ifdef MOZ_CRASHREPORTER
-#include "nsICrashReporter.h"
-#endif
-
namespace mozilla {
static int
ReportException(EXCEPTION_POINTERS* aExceptionInfo)
{
-#ifdef MOZ_CRASHREPORTER
- nsCOMPtr<nsICrashReporter> cr =
- do_GetService("@mozilla.org/toolkit/crash-reporter;1");
- if (cr) {
- cr->WriteMinidumpForException(aExceptionInfo);
- }
-#endif
return EXCEPTION_EXECUTE_HANDLER;
}
diff --git a/xpcom/base/nsCycleCollector.cpp b/xpcom/base/nsCycleCollector.cpp
index d867f596e..b2c15a1dd 100644
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -188,10 +188,6 @@
#include "mozilla/Telemetry.h"
#include "mozilla/ThreadLocal.h"
-#ifdef MOZ_CRASHREPORTER
-#include "nsExceptionHandler.h"
-#endif
-
using namespace mozilla;
//#define COLLECT_TIME_DEBUG
@@ -3150,14 +3146,6 @@ nsCycleCollector::ScanWhiteNodes(bool aFullySynchGraphBuild)
}
if (pi->mInternalRefs > pi->mRefCount) {
-#ifdef MOZ_CRASHREPORTER
- const char* piName = "Unknown";
- if (pi->mParticipant) {
- piName = pi->mParticipant->ClassName();
- }
- nsPrintfCString msg("More references to an object than its refcount, for class %s", piName);
- CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("CycleCollector"), msg);
-#endif
MOZ_CRASH();
}
diff --git a/xpcom/base/nsDebugImpl.cpp b/xpcom/base/nsDebugImpl.cpp
index 36288d203..96487acda 100644
--- a/xpcom/base/nsDebugImpl.cpp
+++ b/xpcom/base/nsDebugImpl.cpp
@@ -11,9 +11,6 @@
#include "nsDebugImpl.h"
#include "nsDebug.h"
-#ifdef MOZ_CRASHREPORTER
-# include "nsExceptionHandler.h"
-#endif
#include "nsString.h"
#include "nsXULAppAPI.h"
#include "prprf.h"
@@ -380,22 +377,6 @@ NS_DebugBreak(uint32_t aSeverity, const char* aStr, const char* aExpr,
return;
case NS_DEBUG_ABORT: {
-#if defined(MOZ_CRASHREPORTER)
- // Updating crash annotations in the child causes us to do IPC. This can
- // really cause trouble if we're asserting from within IPC code. So we
- // have to do without the annotations in that case.
- if (XRE_IsParentProcess()) {
- // Don't include the PID in the crash report annotation to
- // allow faceting on crash-stats.mozilla.org.
- nsCString note("xpcom_runtime_abort(");
- note += nonPIDBuf.buffer;
- note += ")";
- CrashReporter::AppendAppNotesToCrashReport(note);
- CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AbortMessage"),
- nsDependentCString(nonPIDBuf.buffer));
- }
-#endif // MOZ_CRASHREPORTER
-
#if defined(DEBUG) && defined(_WIN32)
RealBreak();
#endif
@@ -600,8 +581,5 @@ NS_ErrorAccordingToNSPR()
void
NS_ABORT_OOM(size_t aSize)
{
-#if defined(MOZ_CRASHREPORTER)
- CrashReporter::AnnotateOOMAllocationSize(aSize);
-#endif
MOZ_CRASH("OOM");
}
diff --git a/xpcom/base/nsObjCExceptions.h b/xpcom/base/nsObjCExceptions.h
index e63c92af5..b3ed532ec 100644
--- a/xpcom/base/nsObjCExceptions.h
+++ b/xpcom/base/nsObjCExceptions.h
@@ -17,12 +17,6 @@
#import <ExceptionHandling/NSExceptionHandler.h>
#endif
-#if defined(MOZ_CRASHREPORTER) && defined(__cplusplus)
-#include "nsICrashReporter.h"
-#include "nsCOMPtr.h"
-#include "nsServiceManagerUtils.h"
-#endif
-
#include <unistd.h>
#include <signal.h>
#include "nsError.h"
@@ -47,15 +41,6 @@ nsObjCExceptionLog(NSException* aException)
NSLog(@"Mozilla has caught an Obj-C exception [%@: %@]",
[aException name], [aException reason]);
-#if defined(MOZ_CRASHREPORTER) && defined(__cplusplus)
- // Attach exception info to the crash report.
- nsCOMPtr<nsICrashReporter> crashReporter =
- do_GetService("@mozilla.org/toolkit/crash-reporter;1");
- if (crashReporter) {
- crashReporter->AppendObjCExceptionInfoToAppNotes(static_cast<void*>(aException));
- }
-#endif
-
#ifdef DEBUG
@try {
// Try to get stack information out of the exception. 10.5 returns the stack