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

Unified Diff: third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp

Issue 2539333003: Fix crash when calling convertToBlob on an OffscreenCanvas with no pixels (Closed)
Patch Set: remove tab characters Created 4 years 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/fast/canvas/OffscreenCanvas-zero-size-readback.html ('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/core/offscreencanvas/OffscreenCanvas.cpp
diff --git a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
index 7509d86c81e6e5077057d91abf0426c203f29d31..120f897de40d57dbd2c3ea58982cb774b8203ebb 100644
--- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
+++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
@@ -172,7 +172,7 @@ bool OffscreenCanvas::originClean() const {
bool OffscreenCanvas::isPaintable() const {
if (!m_context)
return ImageBuffer::canCreateImageBuffer(m_size);
- return m_context->isPaintable();
+ return m_context->isPaintable() && m_size.width() && m_size.height();
}
bool OffscreenCanvas::isAccelerated() const {
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-zero-size-readback.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698