Title: [102180] trunk/Source/WebCore
Revision
102180
Author
[email protected]
Date
2011-12-06 14:26:27 -0800 (Tue, 06 Dec 2011)

Log Message

[chromium] Don't crash if tile upload happens without painting first
https://bugs.webkit.org/show_bug.cgi?id=73939

Reviewed by James Robinson.

Remove at least one place (in ImageLayerChromium) where this could
happen.

Although this shouldn't happen, we should be robust to it in the
chance that other code causes it to.

* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerChromium::paintContentsIfDirty):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::updateCompositorResources):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (102179 => 102180)


--- trunk/Source/WebCore/ChangeLog	2011-12-06 22:12:56 UTC (rev 102179)
+++ trunk/Source/WebCore/ChangeLog	2011-12-06 22:26:27 UTC (rev 102180)
@@ -1,3 +1,21 @@
+2011-12-06  Adrienne Walker  <[email protected]>
+
+        [chromium] Don't crash if tile upload happens without painting first
+        https://bugs.webkit.org/show_bug.cgi?id=73939
+
+        Reviewed by James Robinson.
+
+        Remove at least one place (in ImageLayerChromium) where this could
+        happen.
+
+        Although this shouldn't happen, we should be robust to it in the
+        chance that other code causes it to.
+
+        * platform/graphics/chromium/ImageLayerChromium.cpp:
+        (WebCore::ImageLayerChromium::paintContentsIfDirty):
+        * platform/graphics/chromium/TiledLayerChromium.cpp:
+        (WebCore::TiledLayerChromium::updateCompositorResources):
+
 2011-12-06  Ruben  <[email protected]>
 
         Enable web audio by default on non-Mac POSIX platforms

Modified: trunk/Source/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp (102179 => 102180)


--- trunk/Source/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp	2011-12-06 22:12:56 UTC (rev 102179)
+++ trunk/Source/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp	2011-12-06 22:26:27 UTC (rev 102180)
@@ -178,9 +178,6 @@
         }
     }
 
-    if (visibleLayerRect().isEmpty())
-        return;
-
     prepareToUpdate(visibleLayerRect());
 }
 

Modified: trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp (102179 => 102180)


--- trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp	2011-12-06 22:12:56 UTC (rev 102179)
+++ trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp	2011-12-06 22:26:27 UTC (rev 102180)
@@ -174,8 +174,12 @@
 
 void TiledLayerChromium::updateCompositorResources(GraphicsContext3D*, CCTextureUpdater& updater)
 {
+    // If this assert is hit, it means that paintContentsIfDirty hasn't been
+    // called on this layer. Any layer that is updated should be painted first.
+    ASSERT(m_tiler);
+
     // Painting could cause compositing to get turned off, which may cause the tiler to become invalidated mid-update.
-    if (m_skipsDraw || m_requestedUpdateRect.isEmpty() || !m_tiler->numTiles())
+    if (m_skipsDraw || m_requestedUpdateRect.isEmpty() || !m_tiler || !m_tiler->numTiles())
         return;
 
     int left, top, right, bottom;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to