b=612334; fix webgl tex-image-invalid-data test; r=bjacob
authorVladimir Vukicevic <vladimir@pobox.com>
Tue, 16 Nov 2010 20:33:04 -0800
changeset 57638 c00572802887a2047d4c53fd51d1ecc40a7ae465
parent 57637 9d379645288791c6362235ab8698bd52ca5b260a
child 57639 53999baefb65d1880b9d9e6f76ab27879edfb35e
push id17016
push uservladimir@mozilla.com
push dateWed, 17 Nov 2010 04:34:14 +0000
treeherdermozilla-central@69844c0f4fd1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob
bugs612334
milestone2.0b8pre
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
b=612334; fix webgl tex-image-invalid-data test; r=bjacob
content/canvas/src/WebGLContextGL.cpp
--- a/content/canvas/src/WebGLContextGL.cpp
+++ b/content/canvas/src/WebGLContextGL.cpp
@@ -3817,17 +3817,17 @@ WebGLContext::TexSubImage2D_base(WebGLen
         = (height-1) * checked_alignedRowSize + checked_plainRowSize;
 
     if (!checked_neededByteLength.valid())
         return ErrorInvalidOperation("texSubImage2D: integer overflow computing the needed buffer size");
 
     PRUint32 bytesNeeded = checked_neededByteLength.value();
  
     if (byteLength < bytesNeeded)
-        return ErrorInvalidValue("texSubImage2D: not enough data for operation (need %d, have %d)", bytesNeeded, byteLength);
+        return ErrorInvalidOperation("texSubImage2D: not enough data for operation (need %d, have %d)", bytesNeeded, byteLength);
 
     WebGLTexture *tex = activeBoundTextureForTarget(target);
 
     if (!tex)
         return ErrorInvalidOperation("texSubImage2D: no texture is bound to this target");
 
     if (!CanvasUtils::CheckSaneSubrectSize(xoffset, yoffset, width, height, tex->width(), tex->height()))
         return ErrorInvalidValue("texSubImage2D: subtexture rectangle out of bounds");