mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
Bug 847716 - bindAttribLocation for /_?webgl_.*/ should generate INVALID_OPERATION - r=bjacob
This commit is contained in:
parent
b4b99568d2
commit
a60b2656c2
@ -339,6 +339,16 @@ bool WebGLContext::ValidateGLSLVariableName(const nsAString& name, const char *i
|
||||
return false;
|
||||
}
|
||||
|
||||
nsString prefix1 = NS_LITERAL_STRING("webgl_");
|
||||
nsString prefix2 = NS_LITERAL_STRING("_webgl_");
|
||||
|
||||
if (Substring(name, 0, prefix1.Length()).Equals(prefix1) ||
|
||||
Substring(name, 0, prefix2.Length()).Equals(prefix2))
|
||||
{
|
||||
ErrorInvalidOperation("%s: string contains a reserved GLSL prefix", info);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user