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

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

Issue 7739008: Fix crash in updateCompositorResources due to null root layer (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 94434)
+++ Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (working copy)
@@ -198,7 +198,7 @@
{
if (m_rootCCLayerImpl)
clearRenderSurfacesOnCCLayerImplRecursive(m_rootCCLayerImpl.get());
- m_computedRenderSurfaceLayerList.clear();
+ m_computedRenderSurfaceLayerList = adoptPtr(new LayerList());
m_rootCCLayerImpl.clear();
}
@@ -304,8 +304,13 @@
m_rootCCLayerImpl = TreeSynchronizer::synchronizeTrees(m_rootLayer.get(), m_rootCCLayerImpl.get());
}
- m_computedRenderSurfaceLayerList = adoptPtr(new LayerList());
- updateLayers(*m_computedRenderSurfaceLayerList);
+ OwnPtr<LayerList> temporaryLayerList = adoptPtr(new LayerList());
+ updateLayers(*temporaryLayerList);
+
+ if (m_rootLayer)
+ m_computedRenderSurfaceLayerList = temporaryLayerList.release();
+ else
+ m_computedRenderSurfaceLayerList = adoptPtr(new LayerList());
}
void LayerRendererChromium::drawLayers()
@@ -381,6 +386,10 @@
m_rootLayerContentTiler->updateRect(m_rootLayerTextureUpdater.get());
}
+ // Painting could turn off compositing, so check for the root layer.
+ if (!m_rootLayer)
+ return;
+
m_contentsTextureManager->reduceMemoryToLimit(textureMemoryReclaimLimitBytes);
updateCompositorResources(renderSurfaceLayerList);
}
« 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