Commit 1c267979 authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Add IsAttached to UpdateHasRelatedPages

I believe the original change crrev.com/ae8ee33c introduced the
problematic code. A related page could be in a detached state.

BUG=1002513

Change-Id: I84cab50cda65f0a66ac407fc89f35bbd2b2ff7cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808115Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697604}
parent 96e82657
......@@ -969,7 +969,7 @@ void Page::UpdateHasRelatedPages() {
LocalFrame* local_main_frame = DynamicTo<LocalFrame>(main_frame_.Get());
// We want to record this only for the pages which have local main frame,
// which is fine as we are aggregating results across all processes.
if (!local_main_frame)
if (!local_main_frame || !local_main_frame->IsAttached())
return;
has_related_pages_ = local_main_frame->GetFrameScheduler()->RegisterFeature(
SchedulingPolicy::Feature::kHasScriptableFramesInMultipleTabs,
......
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