зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1061696 - Don't crash release builds when failing to allocate a surface in AutoRestoreClippedOut::save. r=Bas
This commit is contained in:
Родитель
d41b38b4b3
Коммит
79f2cf5d6d
|
@ -76,7 +76,10 @@ public:
|
|||
|
||||
HRESULT hr = mDT->mDevice->CreateTexture2D(&desc, nullptr, byRef(tmpTexture));
|
||||
if (FAILED(hr)) {
|
||||
gfxWarning() << "Failed to create temporary texture to hold surface data.";
|
||||
gfxWarning() << "Failure to create temporary texture. Size: " << size << " Code: " << hr;
|
||||
// Crash debug builds but try to recover in release builds.
|
||||
MOZ_ASSERT(false);
|
||||
return;
|
||||
}
|
||||
mDT->mDevice->CopyResource(tmpTexture, mDT->mTexture);
|
||||
|
||||
|
@ -90,7 +93,10 @@ public:
|
|||
&props, byRef(mOldSurfBitmap));
|
||||
|
||||
if (FAILED(hr)) {
|
||||
gfxWarning() << "Failed to create shared bitmap for old surface.";
|
||||
gfxWarning() << "Failed to create shared bitmap for old surface. Code: " << hr;
|
||||
// Crash debug builds but try to recover in release builds.
|
||||
MOZ_ASSERT(false);
|
||||
return;
|
||||
}
|
||||
|
||||
IntRect clipBounds;
|
||||
|
|
Загрузка…
Ссылка в новой задаче