Bug 1250710 - Mark specific InvalidEnum case. - r=ethlin
authorJeff Gilbert <jgilbert@mozilla.com>
Mon, 04 Jul 2016 21:20:26 -0700
changeset 305278 43608cd94c6fbf3ae49047d529f37e2fe19e8c1c
parent 305277 0a20a55213d28e92a78f8f483aa27c38818732c7
child 305279 e8b72c8f59f987148823e53fbafbbe3cfde05090
push id79535
push userjgilbert@mozilla.com
push dateMon, 18 Jul 2016 04:46:14 +0000
treeherdermozilla-inbound@b658098634b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersethlin
bugs1250710
milestone50.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 1250710 - Mark specific InvalidEnum case. - r=ethlin MozReview-Commit-ID: HusUzReTnS6
dom/canvas/WebGLContextGL.cpp
--- a/dom/canvas/WebGLContextGL.cpp
+++ b/dom/canvas/WebGLContextGL.cpp
@@ -1616,16 +1616,21 @@ ValidateReadPixelsFormatAndType(const we
     case LOCAL_GL_LUMINANCE:
     case LOCAL_GL_LUMINANCE_ALPHA:
     case LOCAL_GL_DEPTH_COMPONENT:
     case LOCAL_GL_DEPTH_STENCIL:
         webgl->ErrorInvalidEnum("readPixels: Invalid format: 0x%04x", pi.format);
         return false;
     }
 
+    if (pi.type == LOCAL_GL_UNSIGNED_INT_24_8) {
+        webgl->ErrorInvalidEnum("readPixels: Invalid type: 0x%04x", pi.type);
+        return false;
+    }
+
     MOZ_ASSERT(gl->IsCurrent());
     if (gl->IsSupported(gl::GLFeature::ES2_compatibility)) {
         const auto auxFormat = gl->GetIntAs<GLenum>(LOCAL_GL_IMPLEMENTATION_COLOR_READ_FORMAT);
         const auto auxType = gl->GetIntAs<GLenum>(LOCAL_GL_IMPLEMENTATION_COLOR_READ_TYPE);
 
         if (auxFormat && auxType &&
             pi.format == auxFormat && pi.type == auxType)
         {