mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 13:57:32 +00:00
Bug 1270180: More instances of MOZ_CRASH converted to gfxDevCrash and getting GFX prefix. r=jgilbert
MozReview-Commit-ID: BFUu2JG9Tk2 --HG-- extra : rebase_source : 146e8b8dc49dce7735f961df3ddfa3c9130fee32
This commit is contained in:
parent
6b351292a3
commit
e0f647f55d
@ -1956,7 +1956,7 @@ DrawTargetCG::Mask(const Pattern &aSource,
|
|||||||
const Pattern &aMask,
|
const Pattern &aMask,
|
||||||
const DrawOptions &aDrawOptions)
|
const DrawOptions &aDrawOptions)
|
||||||
{
|
{
|
||||||
MOZ_CRASH("not completely implemented");
|
MOZ_CRASH("GFX: not completely implemented");
|
||||||
MarkChanged();
|
MarkChanged();
|
||||||
|
|
||||||
CGContextSaveGState(mCg);
|
CGContextSaveGState(mCg);
|
||||||
|
@ -139,6 +139,7 @@ enum class LogReason : int {
|
|||||||
InvalidContext,
|
InvalidContext,
|
||||||
InvalidCommandList,
|
InvalidCommandList,
|
||||||
AsyncTransactionTimeout,
|
AsyncTransactionTimeout,
|
||||||
|
TextureCreation, // 30
|
||||||
// End
|
// End
|
||||||
MustBeLessThanThis = 101,
|
MustBeLessThanThis = 101,
|
||||||
};
|
};
|
||||||
|
@ -32,7 +32,7 @@ PreferenceAccess::RegisterLivePref(const char* aName, int32_t* aVar,
|
|||||||
int32_t aDefault)
|
int32_t aDefault)
|
||||||
{
|
{
|
||||||
if (!Int32Prefs().append(Int32Pref{ aName, aVar })) {
|
if (!Int32Prefs().append(Int32Pref{ aName, aVar })) {
|
||||||
MOZ_CRASH();
|
MOZ_CRASH("GFX: RegisterLivePref failure");
|
||||||
}
|
}
|
||||||
return aDefault;
|
return aDefault;
|
||||||
}
|
}
|
||||||
|
@ -127,8 +127,8 @@ GetAndInitWARPDisplay(GLLibraryEGL& egl, void* displayType)
|
|||||||
if (display == EGL_NO_DISPLAY) {
|
if (display == EGL_NO_DISPLAY) {
|
||||||
const EGLint err = egl.fGetError();
|
const EGLint err = egl.fGetError();
|
||||||
if (err != LOCAL_EGL_SUCCESS) {
|
if (err != LOCAL_EGL_SUCCESS) {
|
||||||
printf_stderr("Unexpected error: 0x%04x", err);
|
gfxCriticalError() << "Unexpected GL error: " << gfx::hexa(err);
|
||||||
MOZ_CRASH("Unexpected error.");
|
MOZ_CRASH("GFX: Unexpected GL error.");
|
||||||
}
|
}
|
||||||
return EGL_NO_DISPLAY;
|
return EGL_NO_DISPLAY;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "gfxPrefs.h"
|
#include "gfxPrefs.h"
|
||||||
#include "GLContext.h"
|
#include "GLContext.h"
|
||||||
#include "WGLLibrary.h"
|
#include "WGLLibrary.h"
|
||||||
|
#include "nsPrintfCString.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace gl {
|
namespace gl {
|
||||||
@ -149,12 +150,12 @@ public:
|
|||||||
|
|
||||||
~DXGLDevice() {
|
~DXGLDevice() {
|
||||||
if (!mWGL->fDXCloseDevice(mDXGLDeviceHandle)) {
|
if (!mWGL->fDXCloseDevice(mDXGLDeviceHandle)) {
|
||||||
#ifdef DEBUG
|
|
||||||
uint32_t error = GetLastError();
|
uint32_t error = GetLastError();
|
||||||
printf_stderr("wglDXCloseDevice(0x%x) failed: GetLastError(): 0x%x\n",
|
const nsPrintfCString errorMessage("wglDXCloseDevice(0x%x) failed: "
|
||||||
mDXGLDeviceHandle, error);
|
"GetLastError(): 0x%x\n",
|
||||||
#endif
|
mDXGLDeviceHandle, error);
|
||||||
MOZ_CRASH();
|
gfxCriticalError() << errorMessage.BeginReading();
|
||||||
|
MOZ_CRASH("GFX: Problem closing DXGL device");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,13 +163,13 @@ public:
|
|||||||
HANDLE ret = mWGL->fDXRegisterObject(mDXGLDeviceHandle, dxObject, name, type,
|
HANDLE ret = mWGL->fDXRegisterObject(mDXGLDeviceHandle, dxObject, name, type,
|
||||||
access);
|
access);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
#ifdef DEBUG
|
|
||||||
uint32_t error = GetLastError();
|
uint32_t error = GetLastError();
|
||||||
printf_stderr("wglDXRegisterObject(0x%x, 0x%x, %u, 0x%x, 0x%x) failed:"
|
const nsPrintfCString errorMessage("wglDXRegisterObject(0x%x, 0x%x, %u, 0x%x, 0x%x) failed:"
|
||||||
" GetLastError(): 0x%x\n", mDXGLDeviceHandle, dxObject, name,
|
" GetLastError(): 0x%x\n",
|
||||||
type, access, error);
|
mDXGLDeviceHandle, dxObject, name,
|
||||||
#endif
|
type, access, error);
|
||||||
MOZ_CRASH();
|
gfxCriticalError() << errorMessage.BeginReading();
|
||||||
|
MOZ_CRASH("GFX: Problem registering DXGL device");
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -176,12 +177,12 @@ public:
|
|||||||
bool UnregisterObject(HANDLE hObject) const {
|
bool UnregisterObject(HANDLE hObject) const {
|
||||||
bool ret = mWGL->fDXUnregisterObject(mDXGLDeviceHandle, hObject);
|
bool ret = mWGL->fDXUnregisterObject(mDXGLDeviceHandle, hObject);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
#ifdef DEBUG
|
|
||||||
uint32_t error = GetLastError();
|
uint32_t error = GetLastError();
|
||||||
printf_stderr("wglDXUnregisterObject(0x%x, 0x%x) failed: GetLastError():"
|
const nsPrintfCString errorMessage("wglDXUnregisterObject(0x%x, 0x%x) failed: "
|
||||||
" 0x%x\n", mDXGLDeviceHandle, hObject, error);
|
"GetLastError(): 0x%x\n",
|
||||||
#endif
|
mDXGLDeviceHandle, hObject, error);
|
||||||
MOZ_CRASH();
|
gfxCriticalError() << errorMessage.BeginReading();
|
||||||
|
MOZ_CRASH("GFX: Problem unregistering DXGL device");
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -189,12 +190,12 @@ public:
|
|||||||
bool LockObject(HANDLE hObject) const {
|
bool LockObject(HANDLE hObject) const {
|
||||||
bool ret = mWGL->fDXLockObjects(mDXGLDeviceHandle, 1, &hObject);
|
bool ret = mWGL->fDXLockObjects(mDXGLDeviceHandle, 1, &hObject);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
#ifdef DEBUG
|
|
||||||
uint32_t error = GetLastError();
|
uint32_t error = GetLastError();
|
||||||
printf_stderr("wglDXLockObjects(0x%x, 1, {0x%x}) failed: GetLastError():"
|
const nsPrintfCString errorMessage("wglDXLockObjects(0x%x, 1, {0x%x}) "
|
||||||
" 0x%x\n", mDXGLDeviceHandle, hObject, error);
|
"failed: GetLastError(): 0x%x\n",
|
||||||
#endif
|
mDXGLDeviceHandle, hObject, error);
|
||||||
MOZ_CRASH();
|
gfxCriticalError() << errorMessage.BeginReading();
|
||||||
|
MOZ_CRASH("GFX: Problem locking DXGL device");
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -202,12 +203,12 @@ public:
|
|||||||
bool UnlockObject(HANDLE hObject) const {
|
bool UnlockObject(HANDLE hObject) const {
|
||||||
bool ret = mWGL->fDXUnlockObjects(mDXGLDeviceHandle, 1, &hObject);
|
bool ret = mWGL->fDXUnlockObjects(mDXGLDeviceHandle, 1, &hObject);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
#ifdef DEBUG
|
|
||||||
uint32_t error = GetLastError();
|
uint32_t error = GetLastError();
|
||||||
printf_stderr("wglDXUnlockObjects(0x%x, 1, {0x%x}) failed: GetLastError():"
|
const nsPrintfCString errorMessage("wglDXUnlockObjects(0x%x, 1, {0x%x}) "
|
||||||
" 0x%x\n", mDXGLDeviceHandle, hObject, error);
|
"failed: GetLastError(): 0x%x\n",
|
||||||
#endif
|
mDXGLDeviceHandle, hObject, error);
|
||||||
MOZ_CRASH();
|
gfxCriticalError() << errorMessage.BeginReading();
|
||||||
|
MOZ_CRASH("GFX: Problem unlocking DXGL device");
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -331,7 +332,7 @@ SharedSurface_D3D11Interop::ProducerAcquireImpl()
|
|||||||
HRESULT hr = mKeyedMutex->AcquireSync(keyValue, timeoutMs);
|
HRESULT hr = mKeyedMutex->AcquireSync(keyValue, timeoutMs);
|
||||||
if (hr == WAIT_TIMEOUT) {
|
if (hr == WAIT_TIMEOUT) {
|
||||||
// Doubt we should do this? Maybe Wait for ever?
|
// Doubt we should do this? Maybe Wait for ever?
|
||||||
MOZ_CRASH("d3d11Interop timeout");
|
MOZ_CRASH("GFX: d3d11Interop timeout");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ gfx::SurfaceFormat FormatFromBufferDescriptor(const BufferDescriptor& aDescripto
|
|||||||
case BufferDescriptor::TYCbCrDescriptor:
|
case BufferDescriptor::TYCbCrDescriptor:
|
||||||
return gfx::SurfaceFormat::YUV;
|
return gfx::SurfaceFormat::YUV;
|
||||||
default:
|
default:
|
||||||
MOZ_CRASH();
|
MOZ_CRASH("GFX: FormatFromBufferDescriptor");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ gfx::IntSize SizeFromBufferDescriptor(const BufferDescriptor& aDescriptor)
|
|||||||
case BufferDescriptor::TYCbCrDescriptor:
|
case BufferDescriptor::TYCbCrDescriptor:
|
||||||
return aDescriptor.get_YCbCrDescriptor().ySize();
|
return aDescriptor.get_YCbCrDescriptor().ySize();
|
||||||
default:
|
default:
|
||||||
MOZ_CRASH();
|
MOZ_CRASH("GFX: SizeFromBufferDescriptor");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,12 +72,12 @@ static bool TestClientPool(const char* what,
|
|||||||
<< aPool << "-" << aPool->GetFormat() << ", "
|
<< aPool << "-" << aPool->GetFormat() << ", "
|
||||||
<< actual << "-" << actual->GetFormat() << ", "
|
<< actual << "-" << actual->GetFormat() << ", "
|
||||||
<< aClient->GetFormat();
|
<< aClient->GetFormat();
|
||||||
MOZ_CRASH("Crashing with actual");
|
MOZ_CRASH("GFX: Crashing with actual");
|
||||||
} else {
|
} else {
|
||||||
gfxCriticalError() << "Pool error(" << what << "): "
|
gfxCriticalError() << "Pool error(" << what << "): "
|
||||||
<< aPool << "-" << aPool->GetFormat() << ", nullptr, "
|
<< aPool << "-" << aPool->GetFormat() << ", nullptr, "
|
||||||
<< aClient->GetFormat();
|
<< aClient->GetFormat();
|
||||||
MOZ_CRASH("Crashing without actual");
|
MOZ_CRASH("GFX: Crashing without actual");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ok;
|
return ok;
|
||||||
|
@ -269,7 +269,8 @@ CreateBackendIndependentTextureHost(const SurfaceDescriptor& aDesc,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
MOZ_CRASH();
|
gfxCriticalError() << "Failed texture host for backend " << (int)data.type();
|
||||||
|
MOZ_CRASH("GFX: No texture host for backend");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -377,7 +378,7 @@ TextureSource::~TextureSource()
|
|||||||
const char*
|
const char*
|
||||||
TextureSource::Name() const
|
TextureSource::Name() const
|
||||||
{
|
{
|
||||||
MOZ_CRASH("TextureSource without class name");
|
MOZ_CRASH("GFX: TextureSource without class name");
|
||||||
return "TextureSource";
|
return "TextureSource";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -405,7 +406,9 @@ BufferTextureHost::BufferTextureHost(const BufferDescriptor& aDesc,
|
|||||||
mHasIntermediateBuffer = rgb.hasIntermediateBuffer();
|
mHasIntermediateBuffer = rgb.hasIntermediateBuffer();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: MOZ_CRASH();
|
default:
|
||||||
|
gfxCriticalError() << "Bad buffer host descriptor " << (int)mDescriptor.type();
|
||||||
|
MOZ_CRASH("GFX: Bad descriptor");
|
||||||
}
|
}
|
||||||
if (aFlags & TextureFlags::COMPONENT_ALPHA) {
|
if (aFlags & TextureFlags::COMPONENT_ALPHA) {
|
||||||
// One texture of a component alpha texture pair will start out all white.
|
// One texture of a component alpha texture pair will start out all white.
|
||||||
|
@ -147,7 +147,9 @@ struct CompositableTransaction
|
|||||||
MOZ_ASSERT(ok);
|
MOZ_ASSERT(ok);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: MOZ_CRASH();
|
default:
|
||||||
|
MOZ_CRASH("GFX: IBC Fallback destroy actors");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mDestroyedActors.Clear();
|
mDestroyedActors.Clear();
|
||||||
|
@ -170,7 +170,9 @@ public:
|
|||||||
MOZ_ASSERT(ok);
|
MOZ_ASSERT(ok);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: MOZ_CRASH();
|
default:
|
||||||
|
MOZ_CRASH("GFX: SL Fallback destroy actors");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mDestroyedActors.Clear();
|
mDestroyedActors.Clear();
|
||||||
|
@ -135,7 +135,7 @@ SharedPlanarYCbCrImage::AllocateAndGetNewBuffer(uint32_t aSize)
|
|||||||
// buffer which is where the y channel starts by default.
|
// buffer which is where the y channel starts by default.
|
||||||
return mapped.y.data;
|
return mapped.y.data;
|
||||||
} else {
|
} else {
|
||||||
MOZ_CRASH();
|
MOZ_CRASH("GFX: Cannot borrow mapped YCbCr data");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,7 +191,8 @@ SharedPlanarYCbCrImage::Allocate(PlanarYCbCrData& aData)
|
|||||||
// because the underlyin BufferTextureData is always mapped in memory even outside
|
// because the underlyin BufferTextureData is always mapped in memory even outside
|
||||||
// of the lock/unlock interval. That's sad and new code should follow this example.
|
// of the lock/unlock interval. That's sad and new code should follow this example.
|
||||||
if (!mTextureClient->Lock(OpenMode::OPEN_READ) || !mTextureClient->BorrowMappedYCbCrData(mapped)) {
|
if (!mTextureClient->Lock(OpenMode::OPEN_READ) || !mTextureClient->BorrowMappedYCbCrData(mapped)) {
|
||||||
MOZ_CRASH();
|
MOZ_CRASH("GFX: Cannot lock or borrow mapped YCbCr");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
aData.mYChannel = mapped.y.data;
|
aData.mYChannel = mapped.y.data;
|
||||||
|
@ -1740,7 +1740,7 @@ static bool TryCreateTexture2D(ID3D11Device *device,
|
|||||||
return !FAILED(device->CreateTexture2D(desc, data, getter_AddRefs(texture)));
|
return !FAILED(device->CreateTexture2D(desc, data, getter_AddRefs(texture)));
|
||||||
} MOZ_SEH_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
|
} MOZ_SEH_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
|
||||||
// For now we want to aggregrate all the crash signature to a known crash.
|
// For now we want to aggregrate all the crash signature to a known crash.
|
||||||
MOZ_CRASH("Crash creating texture. See bug 1221348.");
|
gfxDevCrash(LogReason::TextureCreation) << "Crash creating texture. See bug 1221348.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user