RenderFrameImpl: do not call RFO::DidStartNavigation until actual start
Calling into WebLocalFrame::WillStartNavigation may cancel the navigation, for example when dispatched javascript event handlers do "window.stop()". Currently, we call RFO::DidStartNavigation prematurely, and never issue a paired "canceled" call when WillStartNavigation fails. We can instead try to start and only then issue observer notification to ensure proper sequence. Tests which navigate from onload handler now correctly report "first navigation finished, second navigation started" instead of the reverse. onreadystatechange-detach previously reported a new navigation, which does not actually happen because frame detaches itself before being able to start navigating. This behavior is fixed now. Bug: 855189 Change-Id: Ia12518ebddf54557f4699cd39168217762c874eb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1800916Reviewed-by:Camille Lamy <clamy@chromium.org> Commit-Queue: Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#697044}
Showing
Please register or sign in to comment