Frame::Navigate is responsible for immediately clearing frame observers
Context: LazyLoadFrameObserver::LoadImmediately only expects to ever be called one time. Before this CL, both LocalFrame::Navigate and RemoteFrame::Navigate didn't immediately call HTMLFrameOwnerElement::CancelPendingLazyLoad(). Therefore if LazyLoadFrameObserver::LoadImmediately() was called, and attempts to navigate a frame but the navigation fails before CancelPendingLazyLoad() was called (which can happen due to the navigation rate limiter etc.), LazyLoadFrameObserver::LoadImmedaitely may be called a second time by the underlying intersection observer which still observes the element. R=sclittle@chromium.org Bug: 1106290 Change-Id: I77f052c5d5a113d0c35f702322d6dc6ec831650b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2303352Reviewed-by:Scott Little <sclittle@chromium.org> Reviewed-by:
Daniel Cheng <dcheng@chromium.org> Commit-Queue: Dominic Farolino <dom@chromium.org> Cr-Commit-Position: refs/heads/master@{#790733}
Showing
Please register or sign in to comment