GetnUniform*vEXT (Robustness extension) passed incorrect parameter in WebGLRenderingC...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Mar 2013 19:49:56 +0000 (19:49 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Mar 2013 19:49:56 +0000 (19:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=111450

Patch by Rajeev Sarvaria <rsarvaria@blackberry.com> on 2013-03-11
Reviewed by Rob Buis.

Bufsize argument corrected to size in bytes instead of number of integers or floats.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::getUniform):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145387 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGLRenderingContext.cpp

index 597e412..a7b93f6 100644 (file)
@@ -1,3 +1,16 @@
+2013-03-11  Rajeev Sarvaria  <rsarvaria@blackberry.com>
+
+        GetnUniform*vEXT (Robustness extension) passed incorrect parameter in WebGLRenderingContext
+        https://bugs.webkit.org/show_bug.cgi?id=111450
+
+        Reviewed by Rob Buis.
+
+        Bufsize argument corrected to size in bytes instead of number of integers or floats.
+
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore):
+        (WebCore::WebGLRenderingContext::getUniform):
+
 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r145375.
index ccb2532..5252856 100644 (file)
@@ -3144,7 +3144,7 @@ WebGLGetInfo WebGLRenderingContext::getUniform(WebGLProgram* program, const WebG
                 case GraphicsContext3D::FLOAT: {
                     GC3Dfloat value[16] = {0};
                     if (m_isRobustnessEXTSupported)
-                        m_context->getExtensions()->getnUniformfvEXT(objectOrZero(program), location, 16, value);
+                        m_context->getExtensions()->getnUniformfvEXT(objectOrZero(program), location, 16 * sizeof(GC3Dfloat), value);
                     else
                         m_context->getUniformfv(objectOrZero(program), location, value);
                     if (length == 1)
@@ -3154,7 +3154,7 @@ WebGLGetInfo WebGLRenderingContext::getUniform(WebGLProgram* program, const WebG
                 case GraphicsContext3D::INT: {
                     GC3Dint value[4] = {0};
                     if (m_isRobustnessEXTSupported)
-                        m_context->getExtensions()->getnUniformivEXT(objectOrZero(program), location, 4, value);
+                        m_context->getExtensions()->getnUniformivEXT(objectOrZero(program), location, 4 * sizeof(GC3Dint), value);
                     else
                         m_context->getUniformiv(objectOrZero(program), location, value);
                     if (length == 1)
@@ -3164,7 +3164,7 @@ WebGLGetInfo WebGLRenderingContext::getUniform(WebGLProgram* program, const WebG
                 case GraphicsContext3D::BOOL: {
                     GC3Dint value[4] = {0};
                     if (m_isRobustnessEXTSupported)
-                        m_context->getExtensions()->getnUniformivEXT(objectOrZero(program), location, 4, value);
+                        m_context->getExtensions()->getnUniformivEXT(objectOrZero(program), location, 4 * sizeof(GC3Dint), value);
                     else
                         m_context->getUniformiv(objectOrZero(program), location, value);
                     if (length > 1) {