html/browsers/browsing-the-web/navigating-across-documents/006.html fails with async policy delegates.
<rdar://problem/37951341>
Created attachment 334698 [details] Patch
Created attachment 334701 [details] Patch
Issue seems to be that: 1. A FormSubmission navigation is scheduled 2. A anchor is activated which calls FrameLoader::urlSelected() FrameLoader::urlSelected() does not cancel pending navigation right away. Instead, it does the navigation policy check (now asynchronously) and only cancels pending navigations when the navigation is approved and provisional load starts. See that FrameLoader::provisionalLoadStarted() calls m_frame.navigationScheduler().cancel(true); The issue is that the NavigationScheduler timer may fire while the policy decision is being made, asynchronously. ScheduledFormSubmission::fire() is called and the starts a new load, which cancels the previous one.
Created attachment 334751 [details] WIP Patch
Created attachment 334760 [details] Patch
Comment on attachment 334760 [details] Patch Clearing flags on attachment: 334760 Committed r229108: <https://trac.webkit.org/changeset/229108>
All reviewed patches have been landed. Closing bug.