Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Unified Diff: Source/core/html/canvas/WebGLRenderingContextBase.cpp

Issue 386953002: Make WebGLRenderingContext.getAttachedShaders() return type nullable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix additional test expectations Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
index 674db7b1393242504ed1bc235aac9ab6ae1f921b..263027e76fd267a076d2db50fecf3470f27539d5 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
@@ -2027,12 +2027,12 @@ PassRefPtr<WebGLActiveInfo> WebGLRenderingContextBase::getActiveUniform(WebGLPro
return WebGLActiveInfo::create(info.name, info.type, info.size);
}
-bool WebGLRenderingContextBase::getAttachedShaders(WebGLProgram* program, Vector<RefPtr<WebGLShader> >& shaderObjects)
+Nullable<Vector<RefPtr<WebGLShader> > > WebGLRenderingContextBase::getAttachedShaders(WebGLProgram* program)
{
- shaderObjects.clear();
if (isContextLost() || !validateWebGLObject("getAttachedShaders", program))
- return false;
+ return Nullable<Vector<RefPtr<WebGLShader> > >();
+ Vector<RefPtr<WebGLShader> > shaderObjects;
const GLenum shaderType[] = {
GL_VERTEX_SHADER,
GL_FRAGMENT_SHADER
@@ -2042,7 +2042,7 @@ bool WebGLRenderingContextBase::getAttachedShaders(WebGLProgram* program, Vector
if (shader)
shaderObjects.append(shader);
}
- return true;
+ return shaderObjects;
}
GLint WebGLRenderingContextBase::getAttribLocation(WebGLProgram* program, const String& name)
« no previous file with comments | « Source/core/html/canvas/WebGLRenderingContextBase.h ('k') | Source/core/html/canvas/WebGLRenderingContextBase.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698