Bug 1402519 - Remove MOZ_CRASHREPORTER directives from accessible; r=surkov

MozReview-Commit-ID: F4eVp4Pcl8I

--HG--
extra : rebase_source : 1223314b029c284c7ef83aa8ec6a71143e6cef98
This commit is contained in:
Gabriele Svelto 2017-10-10 12:01:02 +02:00
Родитель 014408d0f5
Коммит e527eaf39b
4 изменённых файлов: 9 добавлений и 25 удалений

Просмотреть файл

@ -53,10 +53,7 @@
#include "Logging.h"
#endif
#ifdef MOZ_CRASHREPORTER
#include "nsExceptionHandler.h"
#endif
#include "nsImageFrame.h"
#include "nsINamed.h"
#include "nsIObserverService.h"
@ -1369,11 +1366,9 @@ nsAccessibilityService::Init()
NS_ADDREF(gApplicationAccessible); // will release in Shutdown()
gApplicationAccessible->Init();
#ifdef MOZ_CRASHREPORTER
CrashReporter::
AnnotateCrashReport(NS_LITERAL_CSTRING("Accessibility"),
NS_LITERAL_CSTRING("Active"));
#endif
#ifdef XP_WIN
sPendingPlugins = new nsTArray<nsCOMPtr<nsIContent> >;

Просмотреть файл

@ -7,10 +7,8 @@
#include "Compatibility.h"
#include "mozilla/WindowsVersion.h"
#if defined(MOZ_CRASHREPORTER)
#include "nsExceptionHandler.h"
#include "nsPrintfCString.h"
#endif // defined(MOZ_CRASHREPORTER)
#include "nsUnicharUtils.h"
#include "nsWindowsDllInterceptor.h"
#include "nsWinUtils.h"
@ -219,11 +217,9 @@ Compatibility::Init()
// Note we collect some AT statistics/telemetry here for convenience.
InitConsumers();
#ifdef MOZ_CRASHREPORTER
CrashReporter::
AnnotateCrashReport(NS_LITERAL_CSTRING("AccessibilityInProcClient"),
nsPrintfCString("0x%X", sConsumers));
#endif
// Gather telemetry
uint32_t temp = sConsumers;
@ -411,13 +407,11 @@ UseIAccessibleProxyStub()
return true;
}
#if defined(MOZ_CRASHREPORTER)
// If we reach this point then something is seriously wrong with the
// IAccessible configuration in the computer's registry. Let's annotate this
// so that we can easily determine this condition during crash analysis.
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("IAccessibleConfig"),
NS_LITERAL_CSTRING("NoSystemTypeLibOrPS"));
#endif // defined(MOZ_CRASHREPORTER)
return false;
}

Просмотреть файл

@ -17,6 +17,7 @@
#include "nsAccessibilityService.h"
#include "nsWindowsHelpers.h"
#include "nsCOMPtr.h"
#include "nsExceptionHandler.h"
#include "nsIFile.h"
#include "nsXPCOM.h"
#include "RootAccessibleWrap.h"
@ -26,10 +27,6 @@
#include "mozilla/Telemetry.h"
#endif // defined(MOZ_TELEMETRY_REPORTING)
#ifdef MOZ_CRASHREPORTER
#include "nsExceptionHandler.h"
#endif
#include <oaidl.h>
#if !defined(STATE_SYSTEM_NORMAL)
@ -305,7 +302,7 @@ LazyInstantiator::ShouldInstantiate(const DWORD aClientTid)
a11y::SetInstantiator(filePath);
}
#if defined(MOZ_TELEMETRY_REPORTING) || defined(MOZ_CRASHREPORTER)
#if defined(MOZ_TELEMETRY_REPORTING)
if (!mTelemetryThread) {
// Call GatherTelemetry on a background thread because it does I/O on
// the executable file to retrieve version information.
@ -318,12 +315,12 @@ LazyInstantiator::ShouldInstantiate(const DWORD aClientTid)
new AccumulateRunnable(this)));
NS_NewThread(getter_AddRefs(mTelemetryThread), runnable);
}
#endif // defined(MOZ_TELEMETRY_REPORTING) || defined(MOZ_CRASHREPORTER)
#endif // defined(MOZ_TELEMETRY_REPORTING)
return true;
}
#if defined(MOZ_TELEMETRY_REPORTING) || defined(MOZ_CRASHREPORTER)
#if defined(MOZ_TELEMETRY_REPORTING)
/**
* Appends version information in the format "|a.b.c.d".
* If there is no version information, we append nothing.
@ -406,11 +403,9 @@ LazyInstantiator::AccumulateTelemetry(const nsString& aValue)
Telemetry::ScalarSet(Telemetry::ScalarID::A11Y_INSTANTIATORS,
aValue);
#endif // defined(MOZ_TELEMETRY_REPORTING)
#if defined(MOZ_CRASHREPORTER)
CrashReporter::
AnnotateCrashReport(NS_LITERAL_CSTRING("AccessibilityClient"),
NS_ConvertUTF16toUTF8(aValue));
#endif // defined(MOZ_CRASHREPORTER)
}
if (mTelemetryThread) {
@ -418,7 +413,7 @@ LazyInstantiator::AccumulateTelemetry(const nsString& aValue)
mTelemetryThread = nullptr;
}
}
#endif // defined(MOZ_TELEMETRY_REPORTING) || defined(MOZ_CRASHREPORTER)
#endif // defined(MOZ_TELEMETRY_REPORTING)
RootAccessibleWrap*
LazyInstantiator::ResolveRootAccWrap()

Просмотреть файл

@ -87,7 +87,7 @@ private:
bool ShouldInstantiate(const DWORD aClientTid);
bool GetClientExecutableName(const DWORD aClientTid, nsIFile** aOutClientExe);
#if defined(MOZ_TELEMETRY_REPORTING) || defined(MOZ_CRASHREPORTER)
#if defined(MOZ_TELEMETRY_REPORTING)
class AccumulateRunnable final : public Runnable
{
public:
@ -120,7 +120,7 @@ private:
void AppendVersionInfo(nsIFile* aClientExe, nsAString& aStrToAppend);
void GatherTelemetry(nsIFile* aClientExe, AccumulateRunnable* aRunnable);
void AccumulateTelemetry(const nsString& aValue);
#endif // defined(MOZ_TELEMETRY_REPORTING) || defined(MOZ_CRASHREPORTER)
#endif // defined(MOZ_TELEMETRY_REPORTING)
/**
* @return S_OK if we have a valid mRealRoot to invoke methods on
@ -152,9 +152,9 @@ private:
RootAccessibleWrap* mWeakRootAccWrap;
IAccessible* mWeakAccessible;
IDispatch* mWeakDispatch;
#if defined(MOZ_TELEMETRY_REPORTING) || defined(MOZ_CRASHREPORTER)
#if defined(MOZ_TELEMETRY_REPORTING)
nsCOMPtr<nsIThread> mTelemetryThread;
#endif // defined(MOZ_TELEMETRY_REPORTING) || defined(MOZ_CRASHREPORTER)
#endif // defined(MOZ_TELEMETRY_REPORTING)
};
} // namespace a11y