Bug 1324614 - Make MAX_ELEMENT_INDEX default to UINT32_MAX when ES3_compat unavailable. - r=daoshengmu
authorJeff Gilbert <jgilbert@mozilla.com>
Mon, 19 Dec 2016 18:03:18 -0800
changeset 326667 11b1af2e7430b7326157974e642efcdfd37b18d4
parent 326666 45d134d04971016d97fc0e3365ed2dccb81358ba
child 326668 4ef63401845ff91431fcb350be215cbb1750bc98
push id31108
push userphilringnalda@gmail.com
push dateWed, 21 Dec 2016 04:15:33 +0000
treeherdermozilla-central@c36fbe84042d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdaoshengmu
bugs1324614
milestone53.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 1324614 - Make MAX_ELEMENT_INDEX default to UINT32_MAX when ES3_compat unavailable. - r=daoshengmu MozReview-Commit-ID: 5y3cXDaLYXe
dom/canvas/WebGL2ContextState.cpp
--- a/dom/canvas/WebGL2ContextState.cpp
+++ b/dom/canvas/WebGL2ContextState.cpp
@@ -113,17 +113,17 @@ WebGL2Context::GetParameter(JSContext* c
     /* GLint64 */
     case LOCAL_GL_MAX_CLIENT_WAIT_TIMEOUT_WEBGL:
       return JS::NumberValue(0); // TODO
 
     case LOCAL_GL_MAX_ELEMENT_INDEX:
       // GL_MAX_ELEMENT_INDEX becomes available in GL 4.3 or via ES3
       // compatibility
       if (!gl->IsSupported(gl::GLFeature::ES3_compatibility))
-        return JS::NumberValue(0);
+        return JS::NumberValue(UINT32_MAX);
 
       /*** fall through to fGetInteger64v ***/
       MOZ_FALLTHROUGH;
 
     case LOCAL_GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:
     case LOCAL_GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:
     case LOCAL_GL_MAX_UNIFORM_BLOCK_SIZE: {
       GLint64 val;