Bug 598838 - Fix WebGL messages (were printing uninitialized values) - r=vladimir

This commit is contained in:
Benoit Jacob
2010-10-15 17:50:15 -04:00
parent d4c633fe31
commit 87e07899cb
4 changed files with 20 additions and 28 deletions

View File

@@ -111,7 +111,7 @@ WebGLContext::ValidateBuffers(PRUint32 count)
continue;
if (vd.buf == nsnull) {
LogMessage(mVerbose, "No VBO bound to enabled attrib index %d!", i);
LogMessageIfVerbose("No VBO bound to enabled attrib index %d!", i);
return PR_FALSE;
}
@@ -126,12 +126,12 @@ WebGLContext::ValidateBuffers(PRUint32 count)
CheckedUint32(vd.componentSize()) * vd.size; // and the number of bytes needed for these components
if (!checked_needed.valid()) {
LogMessage(mVerbose, "Integer overflow computing the size of bound vertex attrib buffer at index %d", i);
LogMessageIfVerbose("Integer overflow computing the size of bound vertex attrib buffer at index %d", i);
return PR_FALSE;
}
if (vd.buf->ByteLength() < checked_needed.value()) {
LogMessage(mVerbose, "VBO too small for bound attrib index %d: need at least %d bytes, but have only %d",
LogMessageIfVerbose("VBO too small for bound attrib index %d: need at least %d bytes, but have only %d",
i, checked_needed.value(), vd.buf->ByteLength());
return PR_FALSE;
}