Files
servo/components/script/dom/webgl/validations
Babalola Taiwo J 3bf38ef7ea script: Fix panic in compressedTexSubImage2D when no base image exists (#44050)
Calling `compressedTexSubImage2D` without a prior `compressedTexImage2D`
for the same texture target and level caused the panic at
`tex_image_2d.rs:633` because `image_info_for_target` returned `None`
and `.unwrap()` was called on it.

Per the WebGL spec, this should generate `GL_INVALID_OPERATION` instead
of panicking. So this PR replaces the unwrap with proper error handling.
And also includes a WPT crash test that reproduces the original panic.

Fixes #43527

---------

Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
2026-04-10 17:08:55 +00:00
..