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

Unified Diff: Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp

Issue 7866017: If a GraphicsLayerChromium goes away during the middle of paint, its (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (revision 94875)
+++ Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (working copy)
@@ -563,6 +563,8 @@
CCLayerImpl* renderSurfaceLayer = renderSurfaceLayerList[surfaceIndex].get();
RenderSurfaceChromium* renderSurface = renderSurfaceLayer->renderSurface();
ASSERT(renderSurface);
+ if (!renderSurface)
+ continue;
renderSurface->setSkipsDraw(true);
@@ -964,6 +966,8 @@
CCLayerImpl* renderSurfaceLayer = renderSurfaceLayerList[surfaceIndex].get();
RenderSurfaceChromium* renderSurface = renderSurfaceLayer->renderSurface();
ASSERT(renderSurface);
+ if (!renderSurface)
+ continue;
if (!renderSurface->layerList().size() || !renderSurface->drawOpacity())
continue;
@@ -972,6 +976,8 @@
ASSERT(layerList.size());
for (unsigned layerIndex = 0; layerIndex < layerList.size(); ++layerIndex) {
CCLayerImpl* ccLayerImpl = layerList[layerIndex].get();
+ if (!ccLayerImpl)
nduca 2011/09/09 23:24:09 (drive by) How do we prevent this crap from happen
+ continue;
if (ccLayerImpl->renderSurface() && ccLayerImpl->renderSurface() != renderSurface)
continue;
@@ -1067,6 +1073,9 @@
void LayerRendererChromium::drawLayer(CCLayerImpl* layer, RenderSurfaceChromium* targetSurface)
{
+ if (!layer)
+ return;
+
if (layer->renderSurface() && layer->renderSurface() != targetSurface) {
layer->renderSurface()->draw(layer->getDrawRect());
layer->renderSurface()->releaseContentsTexture();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698