Skip to content

Commit

Permalink
RemoteFrame ignores visibility updates after detach
Browse files Browse the repository at this point in the history
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/806363
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521694}
  • Loading branch information
kenrb authored and Commit Bot committed Dec 5, 2017
1 parent 811e9b1 commit ac47dc8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ void RemoteFrameView::SetupRenderThrottling() {
void RemoteFrameView::UpdateRenderThrottlingStatus(bool hidden,
bool subtree_throttled) {
TRACE_EVENT0("blink", "RemoteFrameView::UpdateRenderThrottlingStatus");
if (!remote_frame_->Client())
return;

bool was_throttled = CanThrottleRendering();

// Note that we disallow throttling of 0x0 and display:none frames because
Expand Down

0 comments on commit ac47dc8

Please sign in to comment.