mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Prevent use of reserved names in BindAttribLocation
This commit is contained in:
parent
b00c2740e3
commit
a67a744057
3 changed files with 11 additions and 8 deletions
|
@ -147,7 +147,7 @@ impl WebGLProgram {
|
|||
}
|
||||
|
||||
// Check if the name is reserved
|
||||
if name.starts_with("webgl") || name.starts_with("_webgl_") {
|
||||
if name.starts_with("gl_") || name.starts_with("webgl") || name.starts_with("_webgl_") {
|
||||
return Err(WebGLError::InvalidOperation);
|
||||
}
|
||||
|
||||
|
@ -185,6 +185,10 @@ impl WebGLProgram {
|
|||
}
|
||||
|
||||
// Check if the name is reserved
|
||||
if name.starts_with("gl_") {
|
||||
return Err(WebGLError::InvalidOperation);
|
||||
}
|
||||
|
||||
if name.starts_with("webgl") || name.starts_with("_webgl_") {
|
||||
return Ok(None);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue