Bug 1228488 - Return INVALID_ENUM for GL_UNIFORM_NAME_LENGTH. r=jgilbert
authorMorris Tseng <mtseng@mozilla.com>
Tue, 01 Dec 2015 10:16:12 +0800
changeset 274834 3a5c79d9350404a65860e0663d2036a0708df5f5
parent 274833 ae9f5883e654131f73236505da292faff9fc06be
child 274835 a9f0334501a97f1026aaa651ecbe760762abcef5
push id29739
push usercbook@mozilla.com
push dateTue, 01 Dec 2015 14:26:30 +0000
treeherdermozilla-central@974fe614d529 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1228488
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1228488 - Return INVALID_ENUM for GL_UNIFORM_NAME_LENGTH. r=jgilbert
dom/canvas/WebGL2ContextUniforms.cpp
--- a/dom/canvas/WebGL2ContextUniforms.cpp
+++ b/dom/canvas/WebGL2ContextUniforms.cpp
@@ -320,16 +320,21 @@ WebGL2Context::GetActiveUniforms(WebGLPr
                                  const dom::Sequence<GLuint>& uniformIndices,
                                  GLenum pname,
                                  dom::Nullable< nsTArray<GLint> >& retval)
 {
     retval.SetNull();
     if (IsContextLost())
         return;
 
+    if (pname == LOCAL_GL_UNIFORM_NAME_LENGTH) {
+        ErrorInvalidEnumInfo("getActiveUniforms: pname", pname);
+        return;
+    }
+
     if (!ValidateObject("getActiveUniforms: program", program))
         return;
 
     size_t count = uniformIndices.Length();
     if (!count)
         return;
 
     GLuint progname = program->mGLName;