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

Unified Diff: Source/core/rendering/RenderLayerCompositor.cpp

Issue 139313008: Fix crash due to missing null check in squashing code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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/core/rendering/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/RenderLayerCompositor.cpp b/Source/core/rendering/RenderLayerCompositor.cpp
index 9cd7d84cfe9c8003522ebfeeb2f43cbdf8f24d95..b86537ee32d7dc01985c884de4c16f90795b893c 100644
--- a/Source/core/rendering/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/RenderLayerCompositor.cpp
@@ -1135,10 +1135,13 @@ void RenderLayerCompositor::assignLayersToBackingsInternal(RenderLayer* layer, S
// an invalidation if we needed to.
if (layer->shouldInvalidateNextBacking()) {
// FIXME: these should invalidate only the rect that needs to be invalidated, i.e. the layer's rect in the squashingLayer's space.
- if (layer->compositingState() == PaintsIntoGroupedBacking && squashingState.mostRecentMapping->squashingLayer())
+ if (layer->compositingState() == PaintsIntoGroupedBacking && squashingState.mostRecentMapping->squashingLayer()) {
squashingState.mostRecentMapping->squashingLayer()->setNeedsDisplay();
- else
- layer->enclosingCompositingLayerForRepaint(ExcludeSelf)->compositedLayerMapping()->setContentsNeedDisplay();
+ } else {
+ RenderLayer* enclosingLayer = layer->enclosingCompositingLayerForRepaint(ExcludeSelf);
+ if (enclosingLayer->hasCompositedLayerMapping())
+ enclosingLayer->compositedLayerMapping()->setContentsNeedDisplay();
+ }
layer->setShouldInvalidateNextBacking(false);
}
« 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