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
|
@ -979,12 +979,10 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
|||
fn GetUniformLocation(&self,
|
||||
program: Option<&WebGLProgram>,
|
||||
name: DOMString) -> Option<Root<WebGLUniformLocation>> {
|
||||
if let Some(program) = program {
|
||||
handle_potential_webgl_error!(self, program.get_uniform_location(name), None)
|
||||
.map(|location| WebGLUniformLocation::new(self.global().r(), location, program.id()))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
program.and_then(|p| {
|
||||
handle_potential_webgl_error!(self, p.get_uniform_location(name), None)
|
||||
.map(|location| WebGLUniformLocation::new(self.global().r(), location, p.id()))
|
||||
})
|
||||
}
|
||||
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue