mirror of
https://github.com/servo/servo
synced 2026-05-05 06:32:13 +02:00
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>