Bug 183168 - html/browsers/browsing-the-web/navigating-across-documents/006.html fails with async policy delegates
Summary: html/browsers/browsing-the-web/navigating-across-documents/006.html fails wit...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 180568
  Show dependency treegraph
 
Reported: 2018-02-27 11:52 PST by Chris Dumez
Modified: 2018-02-28 15:58 PST (History)
12 users (show)

See Also:


Attachments
Patch (6.94 KB, patch)
2018-02-27 12:08 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (7.00 KB, patch)
2018-02-27 12:46 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (11.47 KB, patch)
2018-02-28 10:20 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (7.31 KB, patch)
2018-02-28 13:03 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2018-02-27 11:52:25 PST
html/browsers/browsing-the-web/navigating-across-documents/006.html fails with async policy delegates.
Comment 1 Radar WebKit Bug Importer 2018-02-27 11:57:12 PST
<rdar://problem/37951341>
Comment 2 Chris Dumez 2018-02-27 12:08:16 PST
Created attachment 334698 [details]
Patch
Comment 3 Chris Dumez 2018-02-27 12:46:48 PST
Created attachment 334701 [details]
Patch
Comment 4 Chris Dumez 2018-02-27 14:40:17 PST
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.
Comment 5 Chris Dumez 2018-02-28 10:20:20 PST
Created attachment 334751 [details]
WIP Patch
Comment 6 Chris Dumez 2018-02-28 13:03:15 PST
Created attachment 334760 [details]
Patch
Comment 7 WebKit Commit Bot 2018-02-28 15:58:27 PST
Comment on attachment 334760 [details]
Patch

Clearing flags on attachment: 334760

Committed r229108: <https://trac.webkit.org/changeset/229108>
Comment 8 WebKit Commit Bot 2018-02-28 15:58:29 PST
All reviewed patches have been landed.  Closing bug.