Commit 73063d16 authored by danakj's avatar danakj Committed by Commit Bot

Add CHECKs to track down why we're making frame sinks when we shouldn't

RenderWidgets attached to RenderView but without a main frame have no
business making a frame sink. Normally this is the state where they are
"swapped out" and we take great care to not make a frame sink in that
case by keeping the compositor non-visible. Something isn't working out
though so let's see why!

R=piman@chromium.org

Change-Id: Idc4e9e8184b6752f50a98a1efb82e436b1fcf08a
Bug: 896836
Reviewed-on: https://chromium-review.googlesource.com/c/1334002Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607785}
parent e0f97777
...@@ -804,7 +804,9 @@ void RenderWidget::OnWasHidden() { ...@@ -804,7 +804,9 @@ void RenderWidget::OnWasHidden() {
void RenderWidget::OnWasShown(base::TimeTicks show_request_timestamp, void RenderWidget::OnWasShown(base::TimeTicks show_request_timestamp,
bool was_evicted) { bool was_evicted) {
TRACE_EVENT0("renderer", "RenderWidget::OnWasShown"); TRACE_EVENT0("renderer", "RenderWidget::OnWasShown");
DCHECK(!is_swapped_out_); // TODO(crbug.com/896836): CHECK to try track down why we make a frame sink
// for a RenderWidget without a main frame.
CHECK(!is_swapped_out_);
// During shutdown we can just ignore this message. // During shutdown we can just ignore this message.
if (!GetWebWidget()) if (!GetWebWidget())
...@@ -979,6 +981,15 @@ void RenderWidget::RequestNewLayerTreeFrameSink( ...@@ -979,6 +981,15 @@ void RenderWidget::RequestNewLayerTreeFrameSink(
return; return;
} }
// TODO(crbug.com/896836): CHECK to try track down why we make a frame sink
// for a RenderWidget without a main frame. If there's no frame widget then
// there is no main frame. This only applies for widgets for frames.
CHECK(!is_swapped_out_);
if (owner_delegate_)
CHECK(GetFrameWidget());
if (for_oopif_)
CHECK(GetFrameWidget());
// TODO(jonross): have this generated by the LayerTreeFrameSink itself, which // TODO(jonross): have this generated by the LayerTreeFrameSink itself, which
// would then handle binding. // would then handle binding.
mojom::RenderFrameMetadataObserverPtr ptr; mojom::RenderFrameMetadataObserverPtr ptr;
......
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