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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 1380633003: Fixed WebGL printing crash due to failed buffer allocation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index d0f75fcae8b4f0af5dc0d06a431493bca717fb04..08d7e982e4dc742fdcc4f1cb6e63bba479827a34 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -1245,6 +1245,9 @@ bool WebGLRenderingContextBase::paintRenderingResultsToCanvas(SourceDrawingBuffe
canvas()->clearCopiedImage();
m_markedCanvasDirty = false;
+ if (!canvas()->buffer())
+ return false;
+
ScopedTexture2DRestorer restorer(this);
ScopedFramebufferRestorer fboRestorer(this);
@@ -1718,6 +1721,7 @@ void WebGLRenderingContextBase::clearColor(GLfloat r, GLfloat g, GLfloat b, GLfl
m_clearColor[2] = b;
m_clearColor[3] = a;
webContext()->clearColor(r, g, b, a);
+ markContextChanged(CanvasChanged);
Ken Russell (switch to Gerrit) 2015/10/01 02:33:30 This looks wrong. markContextChanged is only suppo
Justin Novosad 2015/10/01 02:40:57 You are right. I am missing a call to clear() in t
}
void WebGLRenderingContextBase::clearDepth(GLfloat depth)

Powered by Google App Engine
This is Rietveld 408576698