mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1402519 - Remove MOZ_CRASHREPORTER directives from gfx; r=jrmuizel
MozReview-Commit-ID: 7S8AJ18cCx0 --HG-- extra : rebase_source : 5fb4dbbd0416adeaf1796845e808b053ed029de4
This commit is contained in:
parent
13bba6b3c4
commit
6fc7fdc557
@ -6,13 +6,10 @@
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "GfxTexturesReporter.h"
|
||||
#include "gfxPrefs.h"
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsExceptionHandler.h"
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gl;
|
||||
|
||||
@ -76,7 +73,5 @@ GfxTexturesReporter::UpdateAmount(MemoryUse action, size_t amount)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
CrashReporter::AnnotateTexturesSize(sAmount);
|
||||
#endif
|
||||
}
|
||||
|
@ -144,12 +144,11 @@ GPUChild::RecvGraphicsError(const nsCString& aError)
|
||||
mozilla::ipc::IPCResult
|
||||
GPUChild::RecvInitCrashReporter(Shmem&& aShmem, const NativeThreadId& aThreadId)
|
||||
{
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
mCrashReporter = MakeUnique<ipc::CrashReporterHost>(
|
||||
GeckoProcessType_GPU,
|
||||
aShmem,
|
||||
aThreadId);
|
||||
#endif
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
@ -252,12 +251,10 @@ void
|
||||
GPUChild::ActorDestroy(ActorDestroyReason aWhy)
|
||||
{
|
||||
if (aWhy == AbnormalShutdown) {
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
if (mCrashReporter) {
|
||||
mCrashReporter->GenerateCrashReport(OtherPid());
|
||||
mCrashReporter = nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
Telemetry::Accumulate(Telemetry::SUBPROCESS_ABNORMAL_ABORT,
|
||||
nsDependentCString(XRE_ChildProcessTypeToString(GeckoProcessType_GPU)), 1);
|
||||
|
@ -100,10 +100,8 @@ GPUParent::Init(base::ProcessId aParentPid,
|
||||
// versions.
|
||||
GetIPCChannel()->SendBuildID();
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
// Init crash reporter support.
|
||||
CrashReporterClient::InitSingleton(this);
|
||||
#endif
|
||||
|
||||
// Ensure gfxPrefs are initialized.
|
||||
gfxPrefs::GetSingleton();
|
||||
@ -471,9 +469,7 @@ GPUParent::ActorDestroy(ActorDestroyReason aWhy)
|
||||
gfxVars::Shutdown();
|
||||
gfxConfig::Shutdown();
|
||||
gfxPrefs::DestroySingleton();
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
CrashReporterClient::DestroySingleton();
|
||||
#endif
|
||||
XRE_ShutdownChildProcess();
|
||||
}
|
||||
|
||||
|
@ -39,12 +39,9 @@
|
||||
#include "mozilla/dom/VideoDecoderManagerChild.h"
|
||||
#include "mozilla/dom/VideoDecoderManagerParent.h"
|
||||
#include "MediaPrefs.h"
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsPrintfCString.h"
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
# include "nsExceptionHandler.h"
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
#include "mozilla/widget/AndroidUiThread.h"
|
||||
#include "mozilla/layers/UiCompositorControllerChild.h"
|
||||
@ -368,7 +365,6 @@ GPUProcessManager::OnProcessLaunchComplete(GPUProcessHost* aHost)
|
||||
mVsyncBridge = VsyncBridgeChild::Create(mVsyncIOThread, mProcessToken, Move(vsyncChild));
|
||||
mGPUChild->SendInitVsyncBridge(Move(vsyncParent));
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
CrashReporter::AnnotateCrashReport(
|
||||
NS_LITERAL_CSTRING("GPUProcessStatus"),
|
||||
NS_LITERAL_CSTRING("Running"));
|
||||
@ -376,7 +372,6 @@ GPUProcessManager::OnProcessLaunchComplete(GPUProcessHost* aHost)
|
||||
CrashReporter::AnnotateCrashReport(
|
||||
NS_LITERAL_CSTRING("GPUProcessLaunchCount"),
|
||||
nsPrintfCString("%d", mNumProcessAttempts));
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool
|
||||
@ -717,11 +712,9 @@ GPUProcessManager::DestroyProcess()
|
||||
mVsyncBridge = nullptr;
|
||||
}
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
CrashReporter::AnnotateCrashReport(
|
||||
NS_LITERAL_CSTRING("GPUProcessStatus"),
|
||||
NS_LITERAL_CSTRING("Destroyed"));
|
||||
#endif
|
||||
}
|
||||
|
||||
already_AddRefed<CompositorSession>
|
||||
|
@ -9,9 +9,7 @@
|
||||
#include "gfxConfig.h"
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "nsDirectoryServiceUtils.h"
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsExceptionHandler.h"
|
||||
#endif
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsString.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
@ -167,11 +165,9 @@ DriverCrashGuard::~DriverCrashGuard()
|
||||
dom::ContentChild::GetSingleton()->SendEndDriverCrashGuard(uint32_t(mType));
|
||||
}
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
// Remove the crash report annotation.
|
||||
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("GraphicsStartupTest"),
|
||||
NS_LITERAL_CSTRING(""));
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
@ -210,7 +206,6 @@ DriverCrashGuard::ActivateGuard()
|
||||
{
|
||||
mGuardActivated = true;
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
// Anotate crash reports only if we're a real guard. Otherwise, we could
|
||||
// attribute a random parent process crash to a graphics problem in a child
|
||||
// process.
|
||||
@ -218,7 +213,6 @@ DriverCrashGuard::ActivateGuard()
|
||||
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("GraphicsStartupTest"),
|
||||
NS_LITERAL_CSTRING("1"));
|
||||
}
|
||||
#endif
|
||||
|
||||
// If we're in the content process, the rest of the guarding is handled
|
||||
// in the parent.
|
||||
|
@ -5,13 +5,6 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "gfxCrashReporterUtils.h"
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
#define MOZ_GFXFEATUREREPORTER 1
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_GFXFEATUREREPORTER
|
||||
#include "gfxCrashReporterUtils.h"
|
||||
#include <string.h> // for strcmp
|
||||
#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2
|
||||
#include "mozilla/Services.h" // for GetObserverService
|
||||
@ -137,13 +130,3 @@ ScopedGfxFeatureReporter::AppNote(const nsACString& aMessage)
|
||||
}
|
||||
|
||||
} // end namespace mozilla
|
||||
|
||||
#else
|
||||
|
||||
namespace mozilla {
|
||||
void ScopedGfxFeatureReporter::WriteAppNote(char) {}
|
||||
void ScopedGfxFeatureReporter::AppNote(const nsACString&) {}
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
||||
|
@ -81,7 +81,6 @@ TEST(GfxPrefs, Set) {
|
||||
ASSERT_TRUE(gfxPrefs::APZMaxVelocity() == -1.0f);
|
||||
}
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
// Randomly test the function we use in nsExceptionHandler.cpp here:
|
||||
extern bool SimpleNoCLibDtoA(double aValue, char* aBuffer, int aBufferLength);
|
||||
TEST(GfxPrefs, StringUtility)
|
||||
@ -104,4 +103,3 @@ TEST(GfxPrefs, StringUtility)
|
||||
// It won't fit into 32:
|
||||
ASSERT_FALSE(SimpleNoCLibDtoA(testVal[4], testBuffer, sizeof(testBuffer)/2));
|
||||
}
|
||||
#endif
|
||||
|
@ -21,16 +21,13 @@
|
||||
#include "mozilla/layers/DeviceAttachmentsD3D11.h"
|
||||
#include "mozilla/layers/MLGDeviceD3D11.h"
|
||||
#include "mozilla/layers/PaintThread.h"
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsIGfxInfo.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "nsString.h"
|
||||
#include <d3d11.h>
|
||||
#include <ddraw.h>
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
namespace gfx {
|
||||
|
||||
@ -772,12 +769,10 @@ DeviceManagerDx::MaybeResetAndReacquireDevices()
|
||||
Telemetry::Accumulate(Telemetry::DEVICE_RESET_REASON, uint32_t(resetReason));
|
||||
}
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
nsPrintfCString reasonString("%d", int(resetReason));
|
||||
CrashReporter::AnnotateCrashReport(
|
||||
NS_LITERAL_CSTRING("DeviceResetReason"),
|
||||
reasonString);
|
||||
#endif
|
||||
|
||||
bool createCompositorDevice = !!mCompositorDevice;
|
||||
bool createContentDevice = !!mContentDevice;
|
||||
|
@ -70,6 +70,7 @@
|
||||
#include "gfxGradientCache.h"
|
||||
#include "gfxUtils.h" // for NextPowerOfTwo
|
||||
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsUnicodeRange.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsTArray.h"
|
||||
@ -77,9 +78,6 @@
|
||||
#include "nsIScreenManager.h"
|
||||
#include "FrameMetrics.h"
|
||||
#include "MainThreadUtils.h"
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsExceptionHandler.h"
|
||||
#endif
|
||||
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
@ -298,12 +296,9 @@ void CrashStatsLogForwarder::UpdateCrashReport()
|
||||
message << logAnnotation << Get<0>(it) << "]" << Get<1>(it) << " (t=" << Get<2>(it) << ") ";
|
||||
}
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
nsCString reportString(message.str().c_str());
|
||||
nsresult annotated = CrashReporter::AnnotateCrashReport(mCrashCriticalKey, reportString);
|
||||
#else
|
||||
nsresult annotated = NS_ERROR_NOT_IMPLEMENTED;
|
||||
#endif
|
||||
|
||||
if (annotated != NS_OK) {
|
||||
printf("Crash Annotation %s: %s",
|
||||
mCrashCriticalKey.get(), message.str().c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user