From 68898f4ebd1a9112b7281ec766a725e24c62205e Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Mon, 9 Apr 2018 11:46:12 +0200 Subject: [PATCH] Fix the error emitted for invalid targets in WebGLTexture::bind It doesn't actually matter because this is only called from WebGLRenderingContext::BindTexture, which already checks the target, but better be safe than sorry. --- components/script/dom/webgltexture.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/script/dom/webgltexture.rs b/components/script/dom/webgltexture.rs index ef980c75211..45b26997bc3 100644 --- a/components/script/dom/webgltexture.rs +++ b/components/script/dom/webgltexture.rs @@ -109,7 +109,7 @@ impl WebGLTexture { let face_count = match target { constants::TEXTURE_2D => 1, constants::TEXTURE_CUBE_MAP => 6, - _ => return Err(WebGLError::InvalidOperation) + _ => return Err(WebGLError::InvalidEnum) }; self.face_count.set(face_count); self.target.set(Some(target));