Commit ac47dc85 authored by Ken Buchanan's avatar Ken Buchanan Committed by Commit Bot

RemoteFrame ignores visibility updates after detach

The element visibility observer posts visibility updates to
RemoteFrameView. Based on crash reports, it looks like these can
sometimes arrive after the RemoteFrame has been removed from the
frame tree, making the FrameClient inaccessible. This CL causes an
early return in that case, avoiding a null pointer dereference.

Bug: 789460
Change-Id: Ibe82253859a9c0f90917331532dac39ba90fd364
Reviewed-on: https://chromium-review.googlesource.com/806363Reviewed-by: default avatardsinclair <dsinclair@chromium.org>
Commit-Queue: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521694}
parent 811e9b19
...@@ -193,6 +193,9 @@ void RemoteFrameView::SetupRenderThrottling() { ...@@ -193,6 +193,9 @@ void RemoteFrameView::SetupRenderThrottling() {
void RemoteFrameView::UpdateRenderThrottlingStatus(bool hidden, void RemoteFrameView::UpdateRenderThrottlingStatus(bool hidden,
bool subtree_throttled) { bool subtree_throttled) {
TRACE_EVENT0("blink", "RemoteFrameView::UpdateRenderThrottlingStatus"); TRACE_EVENT0("blink", "RemoteFrameView::UpdateRenderThrottlingStatus");
if (!remote_frame_->Client())
return;
bool was_throttled = CanThrottleRendering(); bool was_throttled = CanThrottleRendering();
// Note that we disallow throttling of 0x0 and display:none frames because // Note that we disallow throttling of 0x0 and display:none frames because
......
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