Title: [112165] trunk/Source/WebCore
Revision
112165
Author
[email protected]
Date
2012-03-26 15:59:53 -0700 (Mon, 26 Mar 2012)

Log Message

[Chromium] Crash in Canvas2DLayerChromium::pushPropertiesTo
https://bugs.webkit.org/show_bug.cgi?id=82243

Patch by Justin Novosad <[email protected]> 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (112164 => 112165)


--- trunk/Source/WebCore/ChangeLog	2012-03-26 22:58:35 UTC (rev 112164)
+++ trunk/Source/WebCore/ChangeLog	2012-03-26 22:59:53 UTC (rev 112165)
@@ -1,3 +1,16 @@
+2012-03-26  Justin Novosad  <[email protected]>
+
+        [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  <[email protected]>
 
         Use PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls

Modified: trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp (112164 => 112165)


--- trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp	2012-03-26 22:58:35 UTC (rev 112164)
+++ trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp	2012-03-26 22:59:53 UTC (rev 112165)
@@ -154,9 +154,12 @@
     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);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to