Add crash annotations before handling device resets. (bug 1363126 part 4, r=milan)

This commit is contained in:
David Anderson 2017-05-11 22:44:28 -07:00
Родитель 42e57ec6d3
Коммит 1118ca109b
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -16,7 +16,9 @@
#include "mozilla/gfx/Logging.h"
#include "mozilla/layers/CompositorThread.h"
#include "mozilla/layers/DeviceAttachmentsD3D11.h"
#include "nsExceptionHandler.h"
#include "nsIGfxInfo.h"
#include "nsPrintfCString.h"
#include <d3d11.h>
#include <ddraw.h>
@ -628,6 +630,13 @@ 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;