Bug 1654477 P5: Add crashtest to trigger texture handle open failures. r=jrmuizel

Differential Revision: https://phabricator.services.mozilla.com/D93674
This commit is contained in:
Bob Owen 2020-10-16 10:57:16 +00:00
Родитель 44cb4850da
Коммит e9515cbc26
4 изменённых файлов: 31 добавлений и 4 удалений

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

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<script>
function boom()
{
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
for (let i = 0; i < 50; i++) {
canvas.width = 20;
ctx.fillStyle = 'green';
ctx.fillRect(1, 1, 20, 20);
canvas.width = 10;
ctx.fillStyle = 'green';
ctx.fillRect(1, 1, 10, 10);
}
}
</script>
</head>
<body onload="boom();">
<canvas id="canvas"></canvas>
</body>
</html>

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

@ -56,3 +56,4 @@ pref(gfx.offscreencanvas.enabled,true) load 1546390.html
load 1549853.html
load 1551745.html
load 1569648.html
skip-if(!winWidget||!isDebugBuild) pref(layers.gpu-process.crash-also-crashes-browser,true) load 1654477.html

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

@ -773,7 +773,7 @@ bool DXGITextureHostD3D11::EnsureTexture() {
(HANDLE)mHandle, __uuidof(ID3D11Texture2D),
(void**)(ID3D11Texture2D**)getter_AddRefs(mTexture));
if (FAILED(hr)) {
NS_WARNING("Failed to open shared texture");
MOZ_ASSERT(false, "Failed to open shared texture");
return false;
}

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

@ -85,9 +85,9 @@ bool RenderDXGITextureHost::EnsureD3D11Texture2D() {
(HANDLE)mHandle, __uuidof(ID3D11Texture2D),
(void**)(ID3D11Texture2D**)getter_AddRefs(mTexture));
if (FAILED(hr)) {
NS_WARNING(
"RenderDXGITextureHost::EnsureLockable(): Failed to open shared "
"texture");
MOZ_ASSERT(false,
"RenderDXGITextureHost::EnsureLockable(): Failed to open shared "
"texture");
gfxCriticalNote
<< "RenderDXGITextureHost Failed to open shared texture, hr="
<< gfx::hexa(hr);