mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +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 DrawOptions &aDrawOptions)
|
||||
{
|
||||
MOZ_CRASH("not completely implemented");
|
||||
MOZ_CRASH("GFX: not completely implemented");
|
||||
MarkChanged();
|
||||
|
||||
CGContextSaveGState(mCg);
|
||||
|
@ -139,6 +139,7 @@ enum class LogReason : int {
|
||||
InvalidContext,
|
||||
InvalidCommandList,
|
||||
AsyncTransactionTimeout,
|
||||
TextureCreation, // 30
|
||||
// End
|
||||
MustBeLessThanThis = 101,
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ PreferenceAccess::RegisterLivePref(const char* aName, int32_t* aVar,
|
||||
int32_t aDefault)
|
||||
{
|
||||
if (!Int32Prefs().append(Int32Pref{ aName, aVar })) {
|
||||
MOZ_CRASH();
|
||||
MOZ_CRASH("GFX: RegisterLivePref failure");
|
||||
}
|
||||
return aDefault;
|
||||
}
|
||||
|
@ -127,8 +127,8 @@ GetAndInitWARPDisplay(GLLibraryEGL& egl, void* displayType)
|
||||
if (display == EGL_NO_DISPLAY) {
|
||||
const EGLint err = egl.fGetError();
|
||||
if (err != LOCAL_EGL_SUCCESS) {
|
||||
printf_stderr("Unexpected error: 0x%04x", err);
|
||||
MOZ_CRASH("Unexpected error.");
|
||||
gfxCriticalError() << "Unexpected GL error: " << gfx::hexa(err);
|
||||
MOZ_CRASH("GFX: Unexpected GL error.");
|
||||
}
|
||||
return EGL_NO_DISPLAY;
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "gfxPrefs.h"
|
||||
#include "GLContext.h"
|
||||
#include "WGLLibrary.h"
|
||||
#include "nsPrintfCString.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace gl {
|
||||
@ -149,12 +150,12 @@ public:
|
||||
|
||||
~DXGLDevice() {
|
||||
if (!mWGL->fDXCloseDevice(mDXGLDeviceHandle)) {
|
||||
#ifdef DEBUG
|
||||
uint32_t error = GetLastError();
|
||||
printf_stderr("wglDXCloseDevice(0x%x) failed: GetLastError(): 0x%x\n",
|
||||
mDXGLDeviceHandle, error);
|
||||
#endif
|
||||
MOZ_CRASH();
|
||||
const nsPrintfCString errorMessage("wglDXCloseDevice(0x%x) failed: "
|
||||
"GetLastError(): 0x%x\n",
|
||||
mDXGLDeviceHandle, error);
|
||||
gfxCriticalError() << errorMessage.BeginReading();
|
||||
MOZ_CRASH("GFX: Problem closing DXGL device");
|
||||
}
|
||||
}
|
||||
|
||||
@ -162,13 +163,13 @@ public:
|
||||
HANDLE ret = mWGL->fDXRegisterObject(mDXGLDeviceHandle, dxObject, name, type,
|
||||
access);
|
||||
if (!ret) {
|
||||
#ifdef DEBUG
|
||||
uint32_t error = GetLastError();
|
||||
printf_stderr("wglDXRegisterObject(0x%x, 0x%x, %u, 0x%x, 0x%x) failed:"
|
||||
" GetLastError(): 0x%x\n", mDXGLDeviceHandle, dxObject, name,
|
||||
type, access, error);
|
||||
#endif
|
||||
MOZ_CRASH();
|
||||
const nsPrintfCString errorMessage("wglDXRegisterObject(0x%x, 0x%x, %u, 0x%x, 0x%x) failed:"
|
||||
" GetLastError(): 0x%x\n",
|
||||
mDXGLDeviceHandle, dxObject, name,
|
||||
type, access, error);
|
||||
gfxCriticalError() << errorMessage.BeginReading();
|
||||
MOZ_CRASH("GFX: Problem registering DXGL device");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -176,12 +177,12 @@ public:
|
||||
bool UnregisterObject(HANDLE hObject) const {
|
||||
bool ret = mWGL->fDXUnregisterObject(mDXGLDeviceHandle, hObject);
|
||||
if (!ret) {
|
||||
#ifdef DEBUG
|
||||
uint32_t error = GetLastError();
|
||||
printf_stderr("wglDXUnregisterObject(0x%x, 0x%x) failed: GetLastError():"
|
||||
" 0x%x\n", mDXGLDeviceHandle, hObject, error);
|
||||
#endif
|
||||
MOZ_CRASH();
|
||||
const nsPrintfCString errorMessage("wglDXUnregisterObject(0x%x, 0x%x) failed: "
|
||||
"GetLastError(): 0x%x\n",
|
||||
mDXGLDeviceHandle, hObject, error);
|
||||
gfxCriticalError() << errorMessage.BeginReading();
|
||||
MOZ_CRASH("GFX: Problem unregistering DXGL device");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -189,12 +190,12 @@ public:
|
||||
bool LockObject(HANDLE hObject) const {
|
||||
bool ret = mWGL->fDXLockObjects(mDXGLDeviceHandle, 1, &hObject);
|
||||
if (!ret) {
|
||||
#ifdef DEBUG
|
||||
uint32_t error = GetLastError();
|
||||
printf_stderr("wglDXLockObjects(0x%x, 1, {0x%x}) failed: GetLastError():"
|
||||
" 0x%x\n", mDXGLDeviceHandle, hObject, error);
|
||||
#endif
|
||||
MOZ_CRASH();
|
||||
const nsPrintfCString errorMessage("wglDXLockObjects(0x%x, 1, {0x%x}) "
|
||||
"failed: GetLastError(): 0x%x\n",
|
||||
mDXGLDeviceHandle, hObject, error);
|
||||
gfxCriticalError() << errorMessage.BeginReading();
|
||||
MOZ_CRASH("GFX: Problem locking DXGL device");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -202,12 +203,12 @@ public:
|
||||
bool UnlockObject(HANDLE hObject) const {
|
||||
bool ret = mWGL->fDXUnlockObjects(mDXGLDeviceHandle, 1, &hObject);
|
||||
if (!ret) {
|
||||
#ifdef DEBUG
|
||||
uint32_t error = GetLastError();
|
||||
printf_stderr("wglDXUnlockObjects(0x%x, 1, {0x%x}) failed: GetLastError():"
|
||||
" 0x%x\n", mDXGLDeviceHandle, hObject, error);
|
||||
#endif
|
||||
MOZ_CRASH();
|
||||
const nsPrintfCString errorMessage("wglDXUnlockObjects(0x%x, 1, {0x%x}) "
|
||||
"failed: GetLastError(): 0x%x\n",
|
||||
mDXGLDeviceHandle, hObject, error);
|
||||
gfxCriticalError() << errorMessage.BeginReading();
|
||||
MOZ_CRASH("GFX: Problem unlocking DXGL device");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -331,7 +332,7 @@ SharedSurface_D3D11Interop::ProducerAcquireImpl()
|
||||
HRESULT hr = mKeyedMutex->AcquireSync(keyValue, timeoutMs);
|
||||
if (hr == WAIT_TIMEOUT) {
|
||||
// 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:
|
||||
return gfx::SurfaceFormat::YUV;
|
||||
default:
|
||||
MOZ_CRASH();
|
||||
MOZ_CRASH("GFX: FormatFromBufferDescriptor");
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ gfx::IntSize SizeFromBufferDescriptor(const BufferDescriptor& aDescriptor)
|
||||
case BufferDescriptor::TYCbCrDescriptor:
|
||||
return aDescriptor.get_YCbCrDescriptor().ySize();
|
||||
default:
|
||||
MOZ_CRASH();
|
||||
MOZ_CRASH("GFX: SizeFromBufferDescriptor");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,12 +72,12 @@ static bool TestClientPool(const char* what,
|
||||
<< aPool << "-" << aPool->GetFormat() << ", "
|
||||
<< actual << "-" << actual->GetFormat() << ", "
|
||||
<< aClient->GetFormat();
|
||||
MOZ_CRASH("Crashing with actual");
|
||||
MOZ_CRASH("GFX: Crashing with actual");
|
||||
} else {
|
||||
gfxCriticalError() << "Pool error(" << what << "): "
|
||||
<< aPool << "-" << aPool->GetFormat() << ", nullptr, "
|
||||
<< aClient->GetFormat();
|
||||
MOZ_CRASH("Crashing without actual");
|
||||
MOZ_CRASH("GFX: Crashing without actual");
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
|
@ -269,7 +269,8 @@ CreateBackendIndependentTextureHost(const SurfaceDescriptor& aDesc,
|
||||
break;
|
||||
}
|
||||
default:
|
||||
MOZ_CRASH();
|
||||
gfxCriticalError() << "Failed texture host for backend " << (int)data.type();
|
||||
MOZ_CRASH("GFX: No texture host for backend");
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -377,7 +378,7 @@ TextureSource::~TextureSource()
|
||||
const char*
|
||||
TextureSource::Name() const
|
||||
{
|
||||
MOZ_CRASH("TextureSource without class name");
|
||||
MOZ_CRASH("GFX: TextureSource without class name");
|
||||
return "TextureSource";
|
||||
}
|
||||
|
||||
@ -405,7 +406,9 @@ BufferTextureHost::BufferTextureHost(const BufferDescriptor& aDesc,
|
||||
mHasIntermediateBuffer = rgb.hasIntermediateBuffer();
|
||||
break;
|
||||
}
|
||||
default: MOZ_CRASH();
|
||||
default:
|
||||
gfxCriticalError() << "Bad buffer host descriptor " << (int)mDescriptor.type();
|
||||
MOZ_CRASH("GFX: Bad descriptor");
|
||||
}
|
||||
if (aFlags & TextureFlags::COMPONENT_ALPHA) {
|
||||
// One texture of a component alpha texture pair will start out all white.
|
||||
|
@ -147,7 +147,9 @@ struct CompositableTransaction
|
||||
MOZ_ASSERT(ok);
|
||||
break;
|
||||
}
|
||||
default: MOZ_CRASH();
|
||||
default:
|
||||
MOZ_CRASH("GFX: IBC Fallback destroy actors");
|
||||
break;
|
||||
}
|
||||
}
|
||||
mDestroyedActors.Clear();
|
||||
|
@ -170,7 +170,9 @@ public:
|
||||
MOZ_ASSERT(ok);
|
||||
break;
|
||||
}
|
||||
default: MOZ_CRASH();
|
||||
default:
|
||||
MOZ_CRASH("GFX: SL Fallback destroy actors");
|
||||
break;
|
||||
}
|
||||
}
|
||||
mDestroyedActors.Clear();
|
||||
|
@ -135,7 +135,7 @@ SharedPlanarYCbCrImage::AllocateAndGetNewBuffer(uint32_t aSize)
|
||||
// buffer which is where the y channel starts by default.
|
||||
return mapped.y.data;
|
||||
} 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
|
||||
// of the lock/unlock interval. That's sad and new code should follow this example.
|
||||
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;
|
||||
|
@ -1740,7 +1740,7 @@ static bool TryCreateTexture2D(ID3D11Device *device,
|
||||
return !FAILED(device->CreateTexture2D(desc, data, getter_AddRefs(texture)));
|
||||
} MOZ_SEH_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user