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

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: reduced canvas size in test to prevent OOM on win7 Created 5 years, 2 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
« no previous file with comments | « third_party/WebKit/LayoutTests/printing/webgl-oversized-printing-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f5d3f7ba3981d1574c6ed5cc4082c5bec1a48bd1 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);
« no previous file with comments | « third_party/WebKit/LayoutTests/printing/webgl-oversized-printing-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698