Commit 224ba0fb authored by Chris Harrelson's avatar Chris Harrelson Committed by Commit Bot

Fix DCHECK, which was happening due to un-initialized variables

for throttled subframes.

needs_forced_compositing_update_ could have been set, in cases
when a style update in a throttled frame caused destructive mutations
of compositing state that must be cleaned up or result in stale
pointers from cc.

needs_forced_compositing_update_ forces off throttling for a frame up to
the compositing step, for this reason. It is cleared during the compositing
update step. This means that ShouldThrottleRendering may return true after
this step when it returned false before.

Bug: 859596,863427

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Idc4857b9f4a465f602e3bcc12a76e48d394a2689
Reviewed-on: https://chromium-review.googlesource.com/1141106Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576202}
parent 775612b8
......@@ -2436,8 +2436,10 @@ bool LocalFrameView::UpdateLifecyclePhasesInternal(
}
if (auto* layout_view = GetLayoutView()) {
ForAllNonThrottledLocalFrameViews([](LocalFrameView& frame_view) {
frame_view.CheckDoesNotNeedLayout();
allows_layout_invalidation_after_layout_clean_ = false;
ForAllChildLocalFrameViews([](LocalFrameView& frame_view) {
if (!frame_view.ShouldThrottleRendering())
frame_view.CheckDoesNotNeedLayout();
frame_view.allows_layout_invalidation_after_layout_clean_ = false;
});
......@@ -2520,8 +2522,10 @@ bool LocalFrameView::UpdateLifecyclePhasesInternal(
Lifecycle().GetState() == DocumentLifecycle::kPaintClean);
}
ForAllNonThrottledLocalFrameViews([](LocalFrameView& frame_view) {
frame_view.CheckDoesNotNeedLayout();
allows_layout_invalidation_after_layout_clean_ = true;
ForAllChildLocalFrameViews([](LocalFrameView& frame_view) {
if (!frame_view.ShouldThrottleRendering())
frame_view.CheckDoesNotNeedLayout();
frame_view.allows_layout_invalidation_after_layout_clean_ = true;
});
}
......
......@@ -1461,14 +1461,15 @@ void PaintLayer::RemoveOnlyThisLayerAfterStyleChange(
MarkAncestorChainForDescendantDependentFlagsUpdate();
}
// Destructing PaintLayer would cause CompositedLayerMapping and composited
// layers to be destructed and detach from layer tree immediately. Layers
// could have dangling scroll/clip parent if compositing update were omitted.
if (LocalFrameView* frame_view = layout_object_.GetDocument().View())
frame_view->SetNeedsForcedCompositingUpdate();
bool did_set_paint_invalidation = false;
if (!RuntimeEnabledFeatures::SlimmingPaintV2Enabled()) {
// Destructing PaintLayer would cause CompositedLayerMapping and composited
// layers to be destructed and detach from layer tree immediately. Layers
// could have dangling scroll/clip parent if compositing update were
// omitted.
if (LocalFrameView* frame_view = layout_object_.GetDocument().View())
frame_view->SetNeedsForcedCompositingUpdate();
// We need the current compositing status.
DisableCompositingQueryAsserts disabler;
if (IsPaintInvalidationContainer()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment