| Index: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
|
| index 1c7f34570322ee4737cf3f6f674b437f6157b753..8651e08af3bece2e375089647a77af31d9e21061 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
|
| @@ -2419,6 +2419,11 @@ GLuint WebGL2RenderingContextBase::getUniformBlockIndex(WebGLProgram* program, c
|
|
|
| bool WebGL2RenderingContextBase::validateUniformBlockIndex(const char* functionName, WebGLProgram* program, GLuint blockIndex)
|
| {
|
| + ASSERT(program);
|
| + if (!program->linkStatus()) {
|
| + synthesizeGLError(GL_INVALID_OPERATION, functionName, "program not linked");
|
| + return false;
|
| + }
|
| GLint activeUniformBlocks = 0;
|
| webContext()->getProgramiv(objectOrZero(program), GL_ACTIVE_UNIFORM_BLOCKS, &activeUniformBlocks);
|
| if (blockIndex >= static_cast<GLuint>(activeUniformBlocks)) {
|
| @@ -3143,9 +3148,9 @@ ScriptValue WebGL2RenderingContextBase::getFramebufferAttachmentParameter(Script
|
| if (missingImage) {
|
| switch (pname) {
|
| case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:
|
| - return WebGLAny(scriptState, GL_FRAMEBUFFER_DEFAULT);
|
| + return WebGLAny(scriptState, GL_NONE);
|
| default:
|
| - synthesizeGLError(GL_INVALID_ENUM, kFunctionName, "invalid parameter name");
|
| + synthesizeGLError(GL_INVALID_OPERATION, kFunctionName, "invalid parameter name");
|
| return ScriptValue::createNull(scriptState);
|
| }
|
| }
|
|
|