Commit 38da049a authored by David Bokan's avatar David Bokan Committed by Commit Bot

[BlinkGenPropertyTrees] Fix site isolation crash

A local root  OOPIF has its own lifecycle but doesn't have its own
visual viewport layers so we'd crash when trying to process them. Only
try to process viewport layers for blink-gen-property-trees when we're
in the main frame.

TEST=Open chrome with --enable-blink-gen-property-trees and open any
site with an out of process iframe. Pass if renderer doesn't crash.

Bug: 854221
Change-Id: I423c90e5cbc7aa20be8541e8e7d89158233f774c
Reviewed-on: https://chromium-review.googlesource.com/1106668Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569042}
parent a3950671
......@@ -3081,8 +3081,10 @@ void LocalFrameView::PaintTree() {
if (RuntimeEnabledFeatures::BlinkGenPropertyTreesEnabled()) {
GraphicsContext context(*paint_controller_);
// Note: Some blink unit tests run without turning on compositing which
// means we don't create viewport layers.
if (GetLayoutView()->Compositor()->InCompositingMode()) {
// means we don't create viewport layers. OOPIFs also don't have their own
// viewport layers.
if (GetLayoutView()->Compositor()->InCompositingMode() &&
GetFrame() == GetPage()->MainFrame()) {
// TODO(bokan): We should eventually stop creating layers for the visual
// viewport. At that point, we can remove this. However, for now, CC
// still has some dependencies on the viewport scale and scroll layers.
......
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