https://bugs.webkit.org/show_bug.cgi?id=82243
Patch by Justin Novosad <junov@chromium.org> on 2012-03-26
Reviewed by James Robinson.
Adding null pointer check to prevent crash and texture object
validity check to prevent potential graphics glitch
* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::pushPropertiesTo):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112165
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-03-26 Justin Novosad <junov@chromium.org>
+
+ [Chromium] Crash in Canvas2DLayerChromium::pushPropertiesTo
+ https://bugs.webkit.org/show_bug.cgi?id=82243
+
+ Reviewed by James Robinson.
+
+ Adding null pointer check to prevent crash and texture object
+ validity check to prevent potential graphics glitch
+
+ * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
+ (WebCore::Canvas2DLayerChromium::pushPropertiesTo):
+
2012-03-26 Adam Klein <adamk@chromium.org>
Use PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls
CanvasLayerChromium::pushPropertiesTo(layer);
CCTextureLayerImpl* textureLayer = static_cast<CCTextureLayerImpl*>(layer);
- if (m_useDoubleBuffering)
- textureLayer->setTextureId(m_frontTexture->textureId());
- else
+ if (m_useDoubleBuffering) {
+ if (m_frontTexture && m_frontTexture->isValid(m_size, GraphicsContext3D::RGBA))
+ textureLayer->setTextureId(m_frontTexture->textureId());
+ else
+ textureLayer->setTextureId(0);
+ } else
textureLayer->setTextureId(m_backTextureId);
}