commit 24437e6b4aab6f1bc14fe241929508d80be9868f
parent b236429448ad1307e31a5e72f328cf9d8b36bda5
Author: Sotaro Ikeda <sotaro.ikeda.g@gmail.com>
Date: Tue, 14 Oct 2025 22:49:27 +0000
Bug 1993470 - Change error handling of DCSurfaceVideo::AttachExternalImage() r=gfx-reviewers,nical
Remove MOZ_RELEASE_ASSERT() and add error log.
Differential Revision: https://phabricator.services.mozilla.com/D268484
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gfx/webrender_bindings/DCLayerTree.cpp b/gfx/webrender_bindings/DCLayerTree.cpp
@@ -1963,7 +1963,12 @@ bool IsYUVSwapChainFormat(DXGI_FORMAT aFormat) {
void DCSurfaceVideo::AttachExternalImage(wr::ExternalImageId aExternalImage) {
auto [texture, usageInfo] =
RenderThread::Get()->GetRenderTextureAndUsageInfo(aExternalImage);
- MOZ_RELEASE_ASSERT(texture);
+ if (!texture) {
+ gfxCriticalNoteOnce << "Failed to attach ExternalImage for extId:"
+ << AsUint64(aExternalImage);
+ mRenderTextureHost = nullptr;
+ return;
+ }
if (usageInfo) {
mRenderTextureHostUsageInfo = usageInfo;