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 308956 3a5c79d9350404a65860e0663d2036a0708df5f5
parent 308955 ae9f5883e654131f73236505da292faff9fc06be
child 308957 a9f0334501a97f1026aaa651ecbe760762abcef5
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [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;