Bug 180568 - Make policy decisions asynchronous
Summary: Make policy decisions asynchronous
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on: 182720 183012 183168 183225 183254 183290 183294 183297 183337 183345 183374 183386 183394 183408 183425 183460 183461 183469 183470 183472 183479 183579 183588 183610 183645 183678 183679 183702 183733 183787 183791 183858 183884 183885 184678
Blocks:
  Show dependency treegraph
 
Reported: 2017-12-07 19:30 PST by Alex Christensen
Modified: 2018-04-16 19:39 PDT (History)
12 users (show)

See Also:


Attachments
Patch (18.79 KB, patch)
2017-12-07 19:30 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (18.64 KB, patch)
2018-01-17 18:06 PST, Alex Christensen
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews107 for mac-sierra-wk2 (1.14 MB, application/zip)
2018-01-17 18:49 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews125 for ios-simulator-wk2 (477.66 KB, application/zip)
2018-01-17 19:14 PST, EWS Watchlist
no flags Details
Rebased (18.82 KB, patch)
2018-02-12 12:43 PST, Chris Dumez
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews121 for ios-simulator-wk2 (517.39 KB, application/zip)
2018-02-12 13:35 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews106 for mac-sierra-wk2 (350.14 KB, application/zip)
2018-02-12 14:05 PST, EWS Watchlist
no flags Details
Rebased (18.84 KB, patch)
2018-02-21 08:46 PST, Chris Dumez
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews105 for mac-sierra-wk2 (987.08 KB, application/zip)
2018-02-21 10:32 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews121 for ios-simulator-wk2 (608.51 KB, application/zip)
2018-02-21 10:39 PST, EWS Watchlist
no flags Details
Rebased (18.84 KB, patch)
2018-03-01 12:00 PST, Chris Dumez
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews107 for mac-sierra-wk2 (1.21 MB, application/zip)
2018-03-01 12:32 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-wk2 (913.88 KB, application/zip)
2018-03-01 13:13 PST, EWS Watchlist
no flags Details
With some tests rebaselined (112.27 KB, patch)
2018-03-02 10:09 PST, Chris Dumez
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-sierra (519.04 KB, application/zip)
2018-03-02 10:53 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews115 for mac-sierra (548.06 KB, application/zip)
2018-03-02 11:08 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews126 for ios-simulator-wk2 (5.63 MB, application/zip)
2018-03-02 11:56 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews202 for win-future (12.26 MB, application/zip)
2018-03-02 13:47 PST, EWS Watchlist
no flags Details
With tests rebaselined only for wk2 (133.33 KB, patch)
2018-03-02 15:28 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
With tests rebaselined only for wk2 (139.14 KB, patch)
2018-03-02 15:42 PST, Chris Dumez
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-sierra-wk2 (3.03 MB, application/zip)
2018-03-02 16:44 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews122 for ios-simulator-wk2 (11.63 MB, application/zip)
2018-03-02 17:12 PST, EWS Watchlist
no flags Details
WIP patch (139.69 KB, patch)
2018-03-06 14:35 PST, Chris Dumez
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews125 for ios-simulator-wk2 (5.41 MB, application/zip)
2018-03-06 16:21 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews104 for mac-sierra-wk2 (2.79 MB, application/zip)
2018-03-06 17:34 PST, EWS Watchlist
no flags Details
WIP patch (140.85 KB, patch)
2018-03-07 13:24 PST, Chris Dumez
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-sierra-wk2 (3.11 MB, application/zip)
2018-03-07 14:43 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews124 for ios-simulator-wk2 (8.47 MB, application/zip)
2018-03-07 14:58 PST, EWS Watchlist
no flags Details
WIP patch (144.07 KB, patch)
2018-03-07 16:38 PST, Chris Dumez
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews106 for mac-sierra-wk2 (2.78 MB, application/zip)
2018-03-07 20:04 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews125 for ios-simulator-wk2 (8.34 MB, application/zip)
2018-03-07 20:31 PST, EWS Watchlist
no flags Details
WIP Patch (146.05 KB, patch)
2018-03-08 11:47 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (146.05 KB, patch)
2018-03-08 11:55 PST, Chris Dumez
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews106 for mac-sierra-wk2 (2.77 MB, application/zip)
2018-03-08 13:37 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews122 for ios-simulator-wk2 (8.41 MB, application/zip)
2018-03-08 13:42 PST, EWS Watchlist
no flags Details
WIP Patch (146.10 KB, patch)
2018-03-12 15:27 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (146.07 KB, patch)
2018-03-12 16:08 PDT, Chris Dumez
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews126 for ios-simulator-wk2 (2.28 MB, application/zip)
2018-03-12 17:43 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews104 for mac-sierra-wk2 (2.95 MB, application/zip)
2018-03-12 17:47 PDT, EWS Watchlist
no flags Details
WIP Patch (147.60 KB, patch)
2018-03-12 18:52 PDT, Chris Dumez
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews107 for mac-sierra-wk2 (2.57 MB, application/zip)
2018-03-12 20:04 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews126 for ios-simulator-wk2 (2.28 MB, application/zip)
2018-03-12 20:18 PDT, EWS Watchlist
no flags Details
WIP Patch (148.26 KB, patch)
2018-03-12 20:25 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews107 for mac-sierra-wk2 (2.60 MB, application/zip)
2018-03-12 22:20 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews124 for ios-simulator-wk2 (2.20 MB, application/zip)
2018-03-12 22:44 PDT, EWS Watchlist
no flags Details
Patch (168.10 KB, patch)
2018-03-13 12:07 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews126 for ios-simulator-wk2 (2.34 MB, application/zip)
2018-03-13 13:25 PDT, EWS Watchlist
no flags Details
Patch (168.12 KB, patch)
2018-03-13 18:19 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (172.68 KB, patch)
2018-03-15 10:09 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (173.21 KB, patch)
2018-03-15 10:25 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (189.73 KB, patch)
2018-03-15 14:09 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-sierra-wk2 (2.63 MB, application/zip)
2018-03-15 15:23 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-wk2 (2.22 MB, application/zip)
2018-03-15 15:51 PDT, EWS Watchlist
no flags Details
Patch (168.17 KB, patch)
2018-03-16 11:35 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (169.20 KB, patch)
2018-03-16 19:05 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-sierra-wk2 (2.62 MB, application/zip)
2018-03-16 20:20 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews121 for ios-simulator-wk2 (8.61 MB, application/zip)
2018-03-16 20:28 PDT, EWS Watchlist
no flags Details
Patch (170.78 KB, patch)
2018-03-19 09:59 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (169.89 KB, patch)
2018-03-19 10:17 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-sierra (2.22 MB, application/zip)
2018-03-19 11:27 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews122 for ios-simulator-wk2 (2.26 MB, application/zip)
2018-03-19 11:41 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews114 for mac-sierra (2.93 MB, application/zip)
2018-03-19 11:55 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews200 for win-future (12.06 MB, application/zip)
2018-03-19 12:02 PDT, EWS Watchlist
no flags Details
Patch (171.25 KB, patch)
2018-03-19 12:47 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (169.17 KB, patch)
2018-03-19 15:31 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (170.43 KB, patch)
2018-03-21 10:14 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (174.48 KB, patch)
2018-03-21 10:18 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (173.57 KB, patch)
2018-03-21 10:53 PDT, 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 Alex Christensen 2017-12-07 19:30:11 PST
Make policy decisions asynchronous
Comment 1 Alex Christensen 2017-12-07 19:30:42 PST
Created attachment 328779 [details]
Patch
Comment 2 Alex Christensen 2017-12-07 19:33:22 PST
Comment on attachment 328779 [details]
Patch

WIP, almost certainly has problems.  Double check all API tests, especially WebKit.JavaScriptDuringNavigation and download tests without NETWORK_SESSION.
Comment 3 Geoffrey Garen 2017-12-07 19:52:39 PST
Will this change help resolve some of the regressions caused by the async policy delegate change?

I ask because I don't think we should push further in the direction of design changes that increase async behavior until we've first finished resolving the regressions caused by the last batch of async behavior.
Comment 4 Alex Christensen 2017-12-08 08:57:07 PST
This is a significant change that I don't think we should do right now anyways.  I just wanted to see what it would take to get working.
Comment 5 Alex Christensen 2018-01-17 18:06:44 PST
Created attachment 331568 [details]
Patch
Comment 6 EWS Watchlist 2018-01-17 18:49:35 PST
Comment on attachment 331568 [details]
Patch

Attachment 331568 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6114864

Number of test failures exceeded the failure limit.
Comment 7 EWS Watchlist 2018-01-17 18:49:36 PST
Created attachment 331575 [details]
Archive of layout-test-results from ews107 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 8 EWS Watchlist 2018-01-17 19:14:04 PST
Comment on attachment 331568 [details]
Patch

Attachment 331568 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6114928

Number of test failures exceeded the failure limit.
Comment 9 EWS Watchlist 2018-01-17 19:14:05 PST
Created attachment 331579 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 10 Chris Dumez 2018-02-12 12:43:57 PST
Created attachment 333618 [details]
Rebased
Comment 11 EWS Watchlist 2018-02-12 13:35:05 PST
Comment on attachment 333618 [details]
Rebased

Attachment 333618 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6470386

Number of test failures exceeded the failure limit.
Comment 12 EWS Watchlist 2018-02-12 13:35:06 PST
Created attachment 333625 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 13 EWS Watchlist 2018-02-12 14:05:22 PST
Comment on attachment 333618 [details]
Rebased

Attachment 333618 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6471172

Number of test failures exceeded the failure limit.
Comment 14 EWS Watchlist 2018-02-12 14:05:23 PST
Created attachment 333630 [details]
Archive of layout-test-results from ews106 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 15 Chris Dumez 2018-02-12 15:23:13 PST
WebResourceLoader::didReceiveResponse() sends the NetworkResourceLoader::ContinueDidReceiveResponse IPC back to the network process right after calling ResourceLosder::didReceiveResponse(). Unfortunately, if the client replies asynchronously to the decidePolicyForNavigationResponse delegate, then this IPC will be sent before receiving the policy response. As a result, we'll start receiving data and even potentially commit the provisional load before the client responds to the policy delegate. I think we need to delay the NetworkResourceLoader::ContinueDidReceiveResponse IPC until we get a policy response from the client.
Comment 16 Chris Dumez 2018-02-13 14:42:59 PST
(In reply to Chris Dumez from comment #15)
> WebResourceLoader::didReceiveResponse() sends the
> NetworkResourceLoader::ContinueDidReceiveResponse IPC back to the network
> process right after calling ResourceLosder::didReceiveResponse().
> Unfortunately, if the client replies asynchronously to the
> decidePolicyForNavigationResponse delegate, then this IPC will be sent
> before receiving the policy response. As a result, we'll start receiving
> data and even potentially commit the provisional load before the client
> responds to the policy delegate. I think we need to delay the
> NetworkResourceLoader::ContinueDidReceiveResponse IPC until we get a policy
> response from the client.

Will address this via Bug 182720.
Comment 17 Chris Dumez 2018-02-13 15:09:07 PST
<rdar://problem/37131297>
Comment 18 Chris Dumez 2018-02-21 08:46:50 PST
Created attachment 334384 [details]
Rebased
Comment 19 EWS Watchlist 2018-02-21 10:32:24 PST
Comment on attachment 334384 [details]
Rebased

Attachment 334384 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6610732

Number of test failures exceeded the failure limit.
Comment 20 EWS Watchlist 2018-02-21 10:32:25 PST
Created attachment 334391 [details]
Archive of layout-test-results from ews105 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 21 EWS Watchlist 2018-02-21 10:39:43 PST
Comment on attachment 334384 [details]
Rebased

Attachment 334384 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6610549

Number of test failures exceeded the failure limit.
Comment 22 EWS Watchlist 2018-02-21 10:39:44 PST
Created attachment 334392 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 23 Chris Dumez 2018-03-01 12:00:40 PST
Created attachment 334834 [details]
Rebased
Comment 24 EWS Watchlist 2018-03-01 12:32:39 PST
Comment on attachment 334834 [details]
Rebased

Attachment 334834 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6723730

Number of test failures exceeded the failure limit.
Comment 25 EWS Watchlist 2018-03-01 12:32:41 PST
Created attachment 334840 [details]
Archive of layout-test-results from ews107 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 26 EWS Watchlist 2018-03-01 13:13:19 PST
Comment on attachment 334834 [details]
Rebased

Attachment 334834 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6724130

Number of test failures exceeded the failure limit.
Comment 27 EWS Watchlist 2018-03-01 13:13:21 PST
Created attachment 334843 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 28 Chris Dumez 2018-03-02 10:09:27 PST
Created attachment 334903 [details]
With some tests rebaselined
Comment 29 EWS Watchlist 2018-03-02 10:53:33 PST
Comment on attachment 334903 [details]
With some tests rebaselined

Attachment 334903 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/6737406

Number of test failures exceeded the failure limit.
Comment 30 EWS Watchlist 2018-03-02 10:53:34 PST
Created attachment 334909 [details]
Archive of layout-test-results from ews101 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 31 EWS Watchlist 2018-03-02 11:08:43 PST
Comment on attachment 334903 [details]
With some tests rebaselined

Attachment 334903 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/6737421

Number of test failures exceeded the failure limit.
Comment 32 EWS Watchlist 2018-03-02 11:08:44 PST
Created attachment 334912 [details]
Archive of layout-test-results from ews115 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 33 EWS Watchlist 2018-03-02 11:56:32 PST
Comment on attachment 334903 [details]
With some tests rebaselined

Attachment 334903 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6737832

New failing tests:
http/tests/misc/window-dot-stop.html
webarchive/loading/video-in-webarchive.html
webarchive/loading/mainresource-null-mimetype-crash.html
fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html
fast/loader/onload-policy-ignore-for-frame.html
fast/html/marquee-reparent-check.html
http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html
http/tests/loading/simple-subframe.html
http/tests/security/mixedContent/insecure-css-with-secure-cookies.html
imported/w3c/web-platform-tests/cors/remote-origin.htm
http/tests/dom/window-open-about-webkit-org-and-access-document.html
fast/loader/window-open-to-invalid-url-disallowed.html
http/tests/workers/service/service-worker-download.https.html
webarchive/loading/test-loading-archive.html
fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html
loader/go-back-cached-main-resource.html
contentfiltering/block-after-will-send-request-then-deny-unblock.html
http/tests/security/frame-loading-via-document-write.html
http/tests/navigation/page-cache-iframe-provisional-load.html
fast/loader/javascript-url-iframe-remove-on-navigate.html
fast/frames/iframe-plugin-load-remove-document-crash.html
contentfiltering/block-after-will-send-request.html
Comment 34 EWS Watchlist 2018-03-02 11:56:33 PST
Created attachment 334914 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 35 EWS Watchlist 2018-03-02 13:47:26 PST
Comment on attachment 334903 [details]
With some tests rebaselined

Attachment 334903 [details] did not pass win-ews (win):
Output: http://webkit-queues.webkit.org/results/6739588

New failing tests:
fast/loader/iframe-meta-refresh-base-blank.html
http/tests/navigation/redirect-to-fragment.html
http/tests/loading/redirect-with-no-location-crash.html
http/tests/loading/bad-server-subframe.html
http/tests/contentdispositionattachmentsandbox/cross-origin-frames-disabled.html
http/tests/loading/slow-parsing-subframe.html
fast/loader/subframe-removes-itself.html
fast/loader/fragment-navigation-base-blank.html
http/tests/security/blocked-on-redirect.html
http/tests/navigation/redirect-to-invalid-url.html
http/tests/loading/server-redirect-for-provisional-load-caching.html
fast/loader/iframe-set-location-base-blank.html
fast/loader/refresh-iframe-base-blank.html
Comment 36 EWS Watchlist 2018-03-02 13:47:38 PST
Created attachment 334922 [details]
Archive of layout-test-results from ews202 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews202  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 37 Chris Dumez 2018-03-02 15:28:39 PST
Created attachment 334935 [details]
With tests rebaselined only for wk2
Comment 38 Chris Dumez 2018-03-02 15:42:49 PST
Created attachment 334937 [details]
With tests rebaselined only for wk2
Comment 39 EWS Watchlist 2018-03-02 16:44:37 PST
Comment on attachment 334937 [details]
With tests rebaselined only for wk2

Attachment 334937 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6741882

New failing tests:
http/tests/misc/window-dot-stop.html
fast/loader/window-open-to-invalid-url-disallowed.html
http/tests/security/frame-loading-via-document-write.html
webarchive/loading/mainresource-null-mimetype-crash.html
fast/events/before-unload-returnValue.html
http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame.html
fast/loader/onload-policy-ignore-for-frame.html
inspector/page/frameScheduledNavigation.html
imported/w3c/web-platform-tests/cors/remote-origin.htm
http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials.html
imported/w3c/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click-404.html
http/tests/workers/service/service-worker-download.https.html
fast/html/marquee-reparent-check.html
http/tests/dom/window-open-about-webkit-org-and-access-document.html
fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html
contentfiltering/block-after-will-send-request-then-deny-unblock.html
contentfiltering/block-after-will-send-request.html
fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html
http/tests/navigation/page-cache-iframe-provisional-load.html
Comment 40 EWS Watchlist 2018-03-02 16:44:39 PST
Created attachment 334941 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 41 EWS Watchlist 2018-03-02 17:12:30 PST
Comment on attachment 334937 [details]
With tests rebaselined only for wk2

Attachment 334937 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6741938

New failing tests:
http/tests/misc/window-dot-stop.html
http/tests/loading/simple-subframe.html
fast/loader/window-open-to-invalid-url-disallowed.html
http/tests/security/frame-loading-via-document-write.html
contentfiltering/block-after-will-send-request.html
http/tests/security/mixedContent/insecure-css-with-secure-cookies.html
http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame.html
fast/loader/onload-policy-ignore-for-frame.html
fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html
imported/w3c/web-platform-tests/cors/remote-origin.htm
http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials.html
http/tests/workers/service/service-worker-download.https.html
fast/html/marquee-reparent-check.html
http/tests/dom/window-open-about-webkit-org-and-access-document.html
fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html
contentfiltering/block-after-will-send-request-then-deny-unblock.html
http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html
http/tests/navigation/page-cache-iframe-provisional-load.html
Comment 42 EWS Watchlist 2018-03-02 17:12:32 PST
Created attachment 334942 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 43 Chris Dumez 2018-03-06 14:35:39 PST
Created attachment 335140 [details]
WIP patch
Comment 44 EWS Watchlist 2018-03-06 16:21:17 PST
Comment on attachment 335140 [details]
WIP patch

Attachment 335140 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6832375

New failing tests:
http/tests/loading/simple-subframe.html
http/tests/navigation/page-cache-iframe-provisional-load.html
http/tests/security/mixedContent/insecure-css-with-secure-cookies.html
http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame.html
fast/loader/javascript-url-iframe-remove-on-navigate.html
imported/w3c/web-platform-tests/cors/remote-origin.htm
http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials.html
http/tests/workers/service/service-worker-download.https.html
fast/html/marquee-reparent-check.html
http/tests/dom/window-open-about-webkit-org-and-access-document.html
http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html
http/tests/security/frame-loading-via-document-write.html
Comment 45 EWS Watchlist 2018-03-06 16:21:18 PST
Created attachment 335156 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 46 EWS Watchlist 2018-03-06 17:34:11 PST
Comment on attachment 335140 [details]
WIP patch

Attachment 335140 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6833563

New failing tests:
http/tests/security/frame-loading-via-document-write.html
webarchive/loading/mainresource-null-mimetype-crash.html
fast/events/before-unload-returnValue.html
http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame.html
inspector/page/frameScheduledNavigation.html
imported/w3c/web-platform-tests/cors/remote-origin.htm
http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials.html
http/tests/workers/service/service-worker-download.https.html
fast/html/marquee-reparent-check.html
http/tests/dom/window-open-about-webkit-org-and-access-document.html
http/tests/navigation/page-cache-iframe-provisional-load.html
Comment 47 EWS Watchlist 2018-03-06 17:34:13 PST
Created attachment 335162 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 48 Chris Dumez 2018-03-07 13:24:20 PST
Created attachment 335210 [details]
WIP patch
Comment 49 EWS Watchlist 2018-03-07 14:43:36 PST
Comment on attachment 335210 [details]
WIP patch

Attachment 335210 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6844406

New failing tests:
http/tests/security/frame-loading-via-document-write.html
webarchive/loading/mainresource-null-mimetype-crash.html
fast/events/before-unload-returnValue.html
http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame.html
inspector/page/frameScheduledNavigation.html
imported/w3c/web-platform-tests/cors/remote-origin.htm
http/tests/workers/service/service-worker-download.https.html
fast/html/marquee-reparent-check.html
http/tests/navigation/page-cache-iframe-provisional-load.html
Comment 50 EWS Watchlist 2018-03-07 14:43:38 PST
Created attachment 335226 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 51 EWS Watchlist 2018-03-07 14:58:44 PST
Comment on attachment 335210 [details]
WIP patch

Attachment 335210 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6844379

New failing tests:
http/tests/navigation/page-cache-iframe-provisional-load.html
http/tests/security/mixedContent/insecure-css-with-secure-cookies.html
http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame.html
imported/w3c/web-platform-tests/cors/remote-origin.htm
http/tests/workers/service/service-worker-download.https.html
fast/html/marquee-reparent-check.html
http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html
http/tests/security/frame-loading-via-document-write.html
Comment 52 EWS Watchlist 2018-03-07 14:58:45 PST
Created attachment 335228 [details]
Archive of layout-test-results from ews124 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews124  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 53 Chris Dumez 2018-03-07 16:38:15 PST
Created attachment 335243 [details]
WIP patch
Comment 54 EWS Watchlist 2018-03-07 20:04:18 PST
Comment on attachment 335243 [details]
WIP patch

Attachment 335243 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6848601

New failing tests:
http/tests/security/frame-loading-via-document-write.html
webarchive/loading/mainresource-null-mimetype-crash.html
fast/events/before-unload-returnValue.html
inspector/page/frameScheduledNavigation.html
imported/w3c/web-platform-tests/cors/remote-origin.htm
http/tests/workers/service/service-worker-download.https.html
fast/html/marquee-reparent-check.html
http/tests/navigation/page-cache-iframe-provisional-load.html
Comment 55 EWS Watchlist 2018-03-07 20:04:20 PST
Created attachment 335252 [details]
Archive of layout-test-results from ews106 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 56 EWS Watchlist 2018-03-07 20:31:15 PST
Comment on attachment 335243 [details]
WIP patch

Attachment 335243 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6848663

New failing tests:
http/tests/navigation/page-cache-iframe-provisional-load.html
http/tests/security/mixedContent/insecure-css-with-secure-cookies.html
imported/w3c/web-platform-tests/cors/remote-origin.htm
http/tests/workers/service/service-worker-download.https.html
fast/html/marquee-reparent-check.html
http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html
http/tests/security/frame-loading-via-document-write.html
Comment 57 EWS Watchlist 2018-03-07 20:31:17 PST
Created attachment 335255 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 58 Chris Dumez 2018-03-08 11:47:31 PST
Created attachment 335324 [details]
WIP Patch
Comment 59 Chris Dumez 2018-03-08 11:55:58 PST
Created attachment 335326 [details]
WIP Patch
Comment 60 EWS Watchlist 2018-03-08 13:37:56 PST
Comment on attachment 335326 [details]
WIP Patch

Attachment 335326 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6861041

New failing tests:
http/tests/security/frame-loading-via-document-write.html
webarchive/loading/mainresource-null-mimetype-crash.html
fast/events/before-unload-returnValue.html
inspector/page/frameScheduledNavigation.html
http/tests/workers/service/service-worker-download.https.html
fast/html/marquee-reparent-check.html
http/tests/navigation/page-cache-iframe-provisional-load.html
Comment 61 EWS Watchlist 2018-03-08 13:37:57 PST
Created attachment 335337 [details]
Archive of layout-test-results from ews106 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 62 EWS Watchlist 2018-03-08 13:42:25 PST
Comment on attachment 335326 [details]
WIP Patch

Attachment 335326 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6860956

New failing tests:
http/tests/navigation/page-cache-iframe-provisional-load.html
fast/loader/javascript-url-iframe-remove-on-navigate.html
http/tests/workers/service/service-worker-download.https.html
fast/html/marquee-reparent-check.html
http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html
http/tests/security/frame-loading-via-document-write.html
Comment 63 EWS Watchlist 2018-03-08 13:42:27 PST
Created attachment 335338 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 64 Chris Dumez 2018-03-12 15:27:14 PDT
Created attachment 335652 [details]
WIP Patch
Comment 65 Chris Dumez 2018-03-12 16:08:29 PDT
Created attachment 335660 [details]
WIP Patch
Comment 66 EWS Watchlist 2018-03-12 17:43:25 PDT
Comment on attachment 335660 [details]
WIP Patch

Attachment 335660 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6926130

New failing tests:
http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html
fast/loader/javascript-url-iframe-remove-on-navigate.html
http/tests/navigation/page-cache-iframe-provisional-load.html
Comment 67 EWS Watchlist 2018-03-12 17:43:27 PDT
Created attachment 335667 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 68 EWS Watchlist 2018-03-12 17:47:57 PDT
Comment on attachment 335660 [details]
WIP Patch

Attachment 335660 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6926711

New failing tests:
inspector/page/frameScheduledNavigation.html
http/tests/navigation/page-cache-iframe-provisional-load.html
webarchive/loading/mainresource-null-mimetype-crash.html
Comment 69 EWS Watchlist 2018-03-12 17:47:58 PDT
Created attachment 335668 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 70 Chris Dumez 2018-03-12 18:52:37 PDT
Created attachment 335670 [details]
WIP Patch
Comment 71 Chris Dumez 2018-03-12 18:55:05 PDT
There should be only one failure left:
http/tests/navigation/page-cache-iframe-provisional-load.html

Which will be dealt with via Bug 183386.
Comment 72 EWS Watchlist 2018-03-12 20:04:43 PDT
Comment on attachment 335670 [details]
WIP Patch

Attachment 335670 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6928257

New failing tests:
http/tests/navigation/page-cache-iframe-provisional-load.html
fast/loader/javascript-url-iframe-remove-on-navigate.html
webarchive/loading/mainresource-null-mimetype-crash.html
Comment 73 EWS Watchlist 2018-03-12 20:04:45 PDT
Created attachment 335674 [details]
Archive of layout-test-results from ews107 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 74 EWS Watchlist 2018-03-12 20:18:02 PDT
Comment on attachment 335670 [details]
WIP Patch

Attachment 335670 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6928215

New failing tests:
http/tests/navigation/page-cache-iframe-provisional-load.html
fast/loader/javascript-url-iframe-remove-on-navigate.html
webarchive/loading/mainresource-null-mimetype-crash.html
Comment 75 EWS Watchlist 2018-03-12 20:18:04 PDT
Created attachment 335676 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 76 Chris Dumez 2018-03-12 20:25:59 PDT
Created attachment 335679 [details]
WIP Patch
Comment 77 EWS Watchlist 2018-03-12 22:20:50 PDT
Comment on attachment 335679 [details]
WIP Patch

Attachment 335679 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6930264

New failing tests:
http/tests/navigation/page-cache-iframe-provisional-load.html
fast/loader/javascript-url-iframe-remove-on-navigate.html
Comment 78 EWS Watchlist 2018-03-12 22:20:51 PDT
Created attachment 335681 [details]
Archive of layout-test-results from ews107 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 79 EWS Watchlist 2018-03-12 22:44:53 PDT
Comment on attachment 335679 [details]
WIP Patch

Attachment 335679 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6930295

New failing tests:
http/tests/navigation/page-cache-iframe-provisional-load.html
fast/loader/javascript-url-iframe-remove-on-navigate.html
Comment 80 EWS Watchlist 2018-03-12 22:44:55 PDT
Created attachment 335682 [details]
Archive of layout-test-results from ews124 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews124  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 81 Chris Dumez 2018-03-13 12:07:26 PDT
Created attachment 335708 [details]
Patch
Comment 82 Chris Dumez 2018-03-13 12:57:54 PDT
Looks like fast/loader/javascript-url-iframe-remove-on-navigate.html is a flaky crash on iOS, so close. Investigating now.
Comment 83 EWS Watchlist 2018-03-13 13:25:09 PDT
Comment on attachment 335708 [details]
Patch

Attachment 335708 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6938725

New failing tests:
fast/loader/javascript-url-iframe-remove-on-navigate-async-delegate.html
fast/loader/javascript-url-iframe-remove-on-navigate.html
Comment 84 EWS Watchlist 2018-03-13 13:25:10 PDT
Created attachment 335719 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 85 Chris Dumez 2018-03-13 18:19:10 PDT
Created attachment 335753 [details]
Patch
Comment 86 WebKit Commit Bot 2018-03-14 14:47:19 PDT
Comment on attachment 335753 [details]
Patch

Clearing flags on attachment: 335753

Committed r229613: <https://trac.webkit.org/changeset/229613>
Comment 87 WebKit Commit Bot 2018-03-14 14:47:22 PDT
All reviewed patches have been landed.  Closing bug.
Comment 88 Ryan Haddad 2018-03-14 15:55:25 PDT
(In reply to WebKit Commit Bot from comment #86)
> Comment on attachment 335753 [details]
> Patch
> 
> Clearing flags on attachment: 335753
> 
> Committed r229613: <https://trac.webkit.org/changeset/229613>
This change caused 29 API test failures:
https://build.webkit.org/builders/Apple%20Sierra%20Release%20WK1%20(Tests)/builds/8798
Comment 89 Chris Dumez 2018-03-14 15:56:21 PDT
(In reply to Ryan Haddad from comment #88)
> (In reply to WebKit Commit Bot from comment #86)
> > Comment on attachment 335753 [details]
> > Patch
> > 
> > Clearing flags on attachment: 335753
> > 
> > Committed r229613: <https://trac.webkit.org/changeset/229613>
> This change caused 29 API test failures:
> https://build.webkit.org/builders/Apple%20Sierra%20Release%20WK1%20(Tests)/
> builds/8798

Darn, I did not think of the API tests.. Let's roll out and I'll investigate those failures.
Comment 90 Ryan Haddad 2018-03-14 15:58:35 PDT
Reverted r229613 for reason:

Caused API test failures

Committed r229617: <https://trac.webkit.org/changeset/229617>
Comment 91 Chris Dumez 2018-03-14 16:29:13 PDT
Tests that failed:
  URLSchemeHandler.Redirection
  WKWebView.LoadAlternateHTMLStringFromProvisionalLoadErrorBackToBack

Tests that timed out:
  IconLoading.AlreadyCachedIcon
  IconLoading.DefaultFavicon
  IconLoading.IconLoadCancelledCallback
  IconLoading.IconLoadCancelledCallback2
  ServiceWorkers.Basic
  ServiceWorkers.FetchAfterRestoreFromDisk
  ServiceWorkers.HasServiceWorkerRegistrationBit
  ServiceWorkers.InterceptFirstLoadAfterRestoreFromDisk
  ServiceWorkers.NonDefaultSessionID
  ServiceWorkers.RestoreFromDisk
  ServiceWorkers.SWProcessConnectionCreation
  ServiceWorkers.ServiceWorkerAndCacheStorageDefaultDirectories
  ServiceWorkers.ServiceWorkerAndCacheStorageSpecificDirectories
  ServiceWorkers.ServiceWorkerProcessCreation
  ServiceWorkers.StorageProcessConnectionCreation
  ServiceWorkers.WaitForPolicyDelegate
  URLSchemeHandler.Basic
  WebKit.CustomHeaderFields
  WebKit.RestoreSessionStateContainingScrollRestorationDefault
  WebKit.ShowWebView
  WebKit.WKNavigationResponseJSONMIMEType
  WebKit.WKNavigationResponseJSONMIMEType2
  WebKit.WKNavigationResponseUnknownMIMEType
  WebKit.WKPageGetScaleFactorNotZero
  WebKit.WebGLPolicy
  WebKit.WebsitePoliciesDuringRedirect
  WebKit.WebsitePoliciesPlayAfterPreventedAutoplay
Comment 92 Chris Dumez 2018-03-15 09:14:26 PDT
Looking at URLSchemeHandler.Redirection API test, I see that the API test scheme handler does:
    auto redirectResponse = adoptNS([[NSURLResponse alloc] initWithURL:task.request.URL MIMEType:nil expectedContentLength:0 textEncodingName:nil]);
    auto request = adoptNS([[NSURLRequest alloc] initWithURL:[NSURL URLWithString:@"testing:///redirected"]]);
    [(id<WKURLSchemeTaskPrivate>)task _didPerformRedirection:redirectResponse.get() newRequest:request.get()];
    ASSERT_FALSE(receivedRedirect);
    ASSERT_STREQ(task.request.URL.absoluteString.UTF8String, "testing:///redirected");
    NSString *html = @"<script>window.webkit.messageHandlers.testHandler.postMessage('Document URL: ' + document.URL);</script>";
    auto finalResponse = adoptNS([[NSURLResponse alloc] initWithURL:task.request.URL MIMEType:@"text/html" expectedContentLength:html.length textEncodingName:nil]);
    [task didReceiveResponse:finalResponse.get()];
    [task didReceiveData:[html dataUsingEncoding:NSUTF8StringEncoding]];
    [task didFinish];

All synchronously.

Now that policy delegates are async, the call to didReceiveResponse() happens while we're still processing the redirect from the _didPerformRedirection call. I thus see logging like so:
Received response during redirect processing.
Redirected scheme task would have been sent to a different URL.

Not sure what the best way to fix this is. My bet is that to maintain API compatibility, we'd have to make WebURLSchemeTaskProxy robust against this happening. E.g. if didReceiveResponse is called while we're still processing a redirect, then queue the response until the redirect has been processed.

Alex, please let me know if I'm wrong since I am not familiar with this code.
Comment 93 Chris Dumez 2018-03-15 10:09:15 PDT
Created attachment 335858 [details]
Patch
Comment 94 Chris Dumez 2018-03-15 10:25:11 PDT
Created attachment 335859 [details]
Patch
Comment 95 Chris Dumez 2018-03-15 10:34:05 PDT
(In reply to Chris Dumez from comment #91)
> Tests that failed:
>   URLSchemeHandler.Redirection
>   WKWebView.LoadAlternateHTMLStringFromProvisionalLoadErrorBackToBack
> 
> Tests that timed out:
>   IconLoading.AlreadyCachedIcon
>   IconLoading.DefaultFavicon
>   IconLoading.IconLoadCancelledCallback
>   IconLoading.IconLoadCancelledCallback2
>   ServiceWorkers.Basic
>   ServiceWorkers.FetchAfterRestoreFromDisk
>   ServiceWorkers.HasServiceWorkerRegistrationBit
>   ServiceWorkers.InterceptFirstLoadAfterRestoreFromDisk
>   ServiceWorkers.NonDefaultSessionID
>   ServiceWorkers.RestoreFromDisk
>   ServiceWorkers.SWProcessConnectionCreation
>   ServiceWorkers.ServiceWorkerAndCacheStorageDefaultDirectories
>   ServiceWorkers.ServiceWorkerAndCacheStorageSpecificDirectories
>   ServiceWorkers.ServiceWorkerProcessCreation
>   ServiceWorkers.StorageProcessConnectionCreation
>   ServiceWorkers.WaitForPolicyDelegate
>   URLSchemeHandler.Basic
>   WebKit.CustomHeaderFields
>   WebKit.RestoreSessionStateContainingScrollRestorationDefault
>   WebKit.ShowWebView
>   WebKit.WKNavigationResponseJSONMIMEType
>   WebKit.WKNavigationResponseJSONMIMEType2
>   WebKit.WKNavigationResponseUnknownMIMEType
>   WebKit.WKPageGetScaleFactorNotZero
>   WebKit.WebGLPolicy
>   WebKit.WebsitePoliciesDuringRedirect
>   WebKit.WebsitePoliciesPlayAfterPreventedAutoplay

Remaining failures with this latest patch iteration:
  WebKit.RestoreSessionStateContainingScrollRestorationDefault
  WebKit.WKPageGetScaleFactorNotZero
  WebKit.WebsitePoliciesAutoplayQuirks
  WebKit.WebsitePoliciesPlayAfterPreventedAutoplay
Comment 96 Alex Christensen 2018-03-15 11:53:35 PDT
(In reply to Chris Dumez from comment #92)
> Alex, please let me know if I'm wrong since I am not familiar with this code.
This test uses SPI on WKURLSchemeTaskPrivate and it's probably not critical to maintain complete API compatibility because that SPI should only be used with internal tests.
Comment 97 Chris Dumez 2018-03-15 11:54:29 PDT
(In reply to Alex Christensen from comment #96)
> (In reply to Chris Dumez from comment #92)
> > Alex, please let me know if I'm wrong since I am not familiar with this code.
> This test uses SPI on WKURLSchemeTaskPrivate and it's probably not critical
> to maintain complete API compatibility because that SPI should only be used
> with internal tests.

I see. Well, it does not add much complexity as you can see in my latest patch.
Comment 98 Alex Christensen 2018-03-15 12:00:09 PDT
I don't think we should maintain an assumption that redirection on WKURLSchemeTasks is effectively synchronous.  I'd prefer to just change the test to call didReceiveResponse, didReceiveData, and didFinish after decidePolicyForNavigationAction has finished.  If that doesn't work because didReceiveResponse is now asynchronous, we might need to take your solution to keep API compatibility with WKURLSchemeHandler.
Comment 99 Chris Dumez 2018-03-15 12:06:30 PDT
(In reply to Alex Christensen from comment #98)
> I don't think we should maintain an assumption that redirection on
> WKURLSchemeTasks is effectively synchronous.  I'd prefer to just change the
> test to call didReceiveResponse, didReceiveData, and didFinish after
> decidePolicyForNavigationAction has finished.  If that doesn't work because
> didReceiveResponse is now asynchronous, we might need to take your solution
> to keep API compatibility with WKURLSchemeHandler.

We're not talking about a single API test here given how many failures were resolved by my change.
Comment 100 Alex Christensen 2018-03-15 12:15:29 PDT
Ah, decidePolicyForNavigationResponse is also now always asynchronous, so the queueing is necessary.  Makes sense.  This was needed before if you had an asynchronous decidePolicyForNavigationResponse but nobody realized it.  It might be worth adding a regression test for that case that is now fixed.

r=me
Comment 101 Chris Dumez 2018-03-15 14:09:12 PDT
Created attachment 335881 [details]
Patch
Comment 102 Alex Christensen 2018-03-15 14:19:57 PDT
Comment on attachment 335881 [details]
Patch

The cleanups in DocumentLoader and WebURLSchemeTaskProxy should each be done in separate patches with unit tests similar to the API tests they fix but with a WKNavigationDelegate that asynchronously calls the completion handlers.  They are fixing existing bugs that are unrelated to the switch to make everything asynchronous.
Comment 103 Chris Dumez 2018-03-15 14:23:04 PDT
(In reply to Chris Dumez from comment #101)
> Created attachment 335881 [details]
> Patch

With this latest iteration, I am down to 2 API tests failing:
  WebKit.WebsitePoliciesAutoplayQuirks
  WebKit.WebsitePoliciesPlayAfterPreventedAutoplay
Comment 104 Chris Dumez 2018-03-15 14:31:40 PDT
(In reply to Alex Christensen from comment #102)
> Comment on attachment 335881 [details]
> Patch
> 
> The cleanups in DocumentLoader and WebURLSchemeTaskProxy should each be done
> in separate patches with unit tests similar to the API tests they fix but
> with a WKNavigationDelegate that asynchronously calls the completion
> handlers.  They are fixing existing bugs that are unrelated to the switch to
> make everything asynchronous.

Ok.
Comment 105 EWS Watchlist 2018-03-15 15:23:19 PDT
Comment on attachment 335881 [details]
Patch

Attachment 335881 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6970674

New failing tests:
http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate.html
Comment 106 EWS Watchlist 2018-03-15 15:23:21 PDT
Created attachment 335892 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 107 EWS Watchlist 2018-03-15 15:51:19 PDT
Comment on attachment 335881 [details]
Patch

Attachment 335881 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6970822

New failing tests:
http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate.html
Comment 108 EWS Watchlist 2018-03-15 15:51:21 PDT
Created attachment 335897 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 109 Chris Dumez 2018-03-16 11:35:27 PDT
Created attachment 335955 [details]
Patch
Comment 110 Chris Dumez 2018-03-16 19:05:58 PDT
Created attachment 335991 [details]
Patch
Comment 111 EWS Watchlist 2018-03-16 20:20:18 PDT
Comment on attachment 335991 [details]
Patch

Attachment 335991 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6991974

New failing tests:
fast/loader/inner-iframe-loads-data-url-into-parent-on-unload-crash.html
Comment 112 EWS Watchlist 2018-03-16 20:20:20 PDT
Created attachment 335993 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 113 EWS Watchlist 2018-03-16 20:28:06 PDT
Comment on attachment 335991 [details]
Patch

Attachment 335991 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/6991735

New failing tests:
fast/loader/inner-iframe-loads-data-url-into-parent-on-unload-crash.html
Comment 114 EWS Watchlist 2018-03-16 20:28:08 PDT
Created attachment 335995 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 115 Chris Dumez 2018-03-16 20:48:14 PDT
Comment on attachment 335991 [details]
Patch

Darn, a newly added test..
Comment 116 Chris Dumez 2018-03-19 09:59:58 PDT
Created attachment 336048 [details]
Patch
Comment 117 Chris Dumez 2018-03-19 10:17:59 PDT
Created attachment 336052 [details]
Patch
Comment 118 EWS Watchlist 2018-03-19 11:27:00 PDT
Comment on attachment 336052 [details]
Patch

Attachment 336052 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/7026598

New failing tests:
http/tests/security/feed-urls-from-remote.html
Comment 119 EWS Watchlist 2018-03-19 11:27:02 PDT
Created attachment 336061 [details]
Archive of layout-test-results from ews101 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 120 EWS Watchlist 2018-03-19 11:41:04 PDT
Comment on attachment 336052 [details]
Patch

Attachment 336052 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/7026470

New failing tests:
http/tests/appcache/interrupted-update.html
Comment 121 EWS Watchlist 2018-03-19 11:41:06 PDT
Created attachment 336062 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 122 EWS Watchlist 2018-03-19 11:55:42 PDT
Comment on attachment 336052 [details]
Patch

Attachment 336052 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/7026762

New failing tests:
http/tests/security/feed-urls-from-remote.html
Comment 123 EWS Watchlist 2018-03-19 11:55:44 PDT
Created attachment 336065 [details]
Archive of layout-test-results from ews114 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 124 EWS Watchlist 2018-03-19 12:02:33 PDT
Comment on attachment 336052 [details]
Patch

Attachment 336052 [details] did not pass win-ews (win):
Output: http://webkit-queues.webkit.org/results/7026953

New failing tests:
http/tests/security/feed-urls-from-remote.html
Comment 125 EWS Watchlist 2018-03-19 12:02:45 PDT
Created attachment 336066 [details]
Archive of layout-test-results from ews200 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews200  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 126 Chris Dumez 2018-03-19 12:47:07 PDT
Created attachment 336070 [details]
Patch
Comment 127 Chris Dumez 2018-03-19 15:31:59 PDT
Created attachment 336080 [details]
Patch
Comment 128 Alex Christensen 2018-03-19 15:33:32 PDT
Comment on attachment 336080 [details]
Patch

woo hoo! let's try this again
Comment 129 WebKit Commit Bot 2018-03-19 16:12:24 PDT
Comment on attachment 336080 [details]
Patch

Clearing flags on attachment: 336080

Committed r229726: <https://trac.webkit.org/changeset/229726>
Comment 130 WebKit Commit Bot 2018-03-19 16:12:27 PDT
All reviewed patches have been landed.  Closing bug.
Comment 131 Ryan Haddad 2018-03-20 09:53:08 PDT
Added WK2 baselines for some webarchive/loading tests in https://trac.webkit.org/changeset/229763/webkit
Comment 132 Chris Dumez 2018-03-20 10:01:33 PDT
Looks like there are some iOS-specific API test failures.
Comment 133 Chris Dumez 2018-03-20 10:01:42 PDT
(In reply to Chris Dumez from comment #132)
> Looks like there are some iOS-specific API test failures.

Tests that failed:
  DataInteractionTests.AdditionalLinkAndImageIntoContentEditable
  DataInteractionTests.CanStartDragOnDivWithDraggableAttribute
  DataInteractionTests.DoNotCrashWhenSelectionMovesOffscreenAfterDragStart
  DataInteractionTests.DragEventClientCoordinatesBasic
  DataInteractionTests.DragImageFromContentEditable
  DataInteractionTests.DragLiftPreviewDataTransferSetDragImage
  DataInteractionTests.ImageDoesNotUseElementSizeAsEstimatedSize
  DataInteractionTests.ImageToContentEditable
  DataInteractionTests.ImageToTextarea
  DataInteractionTests.InjectedBundleAttachmentElementData
  DataInteractionTests.InjectedBundleImageElementData
  DataInteractionTests.LargeImageToTargetDiv
  ScrollViewInsetTests.RestoreInitialContentOffsetAfterCrash
  WKWebView.SnapshotImageLargeAsyncDecoding

Tests that timed out:
  QuickLook.NavigationDelegate
Comment 134 Chris Dumez 2018-03-20 10:08:13 PDT
Reverted r229726 and r229763 for reason:

Caused some API test failures on iOS

Committed r229764: <https://trac.webkit.org/changeset/229764>
Comment 135 Chris Dumez 2018-03-20 10:08:15 PDT
Reverted r229726 and r229763 for reason:

Caused some API test failures on iOS

Committed r229764: <https://trac.webkit.org/changeset/229764>
Comment 136 Chris Dumez 2018-03-20 10:26:25 PDT
(In reply to Chris Dumez from comment #133)
> (In reply to Chris Dumez from comment #132)
> > Looks like there are some iOS-specific API test failures.
> 
> Tests that failed:
>   DataInteractionTests.AdditionalLinkAndImageIntoContentEditable
>   DataInteractionTests.CanStartDragOnDivWithDraggableAttribute
>   DataInteractionTests.DoNotCrashWhenSelectionMovesOffscreenAfterDragStart
>   DataInteractionTests.DragEventClientCoordinatesBasic
>   DataInteractionTests.DragImageFromContentEditable
>   DataInteractionTests.DragLiftPreviewDataTransferSetDragImage
>   DataInteractionTests.ImageDoesNotUseElementSizeAsEstimatedSize
>   DataInteractionTests.ImageToContentEditable
>   DataInteractionTests.ImageToTextarea
>   DataInteractionTests.InjectedBundleAttachmentElementData
>   DataInteractionTests.InjectedBundleImageElementData
>   DataInteractionTests.LargeImageToTargetDiv
>   ScrollViewInsetTests.RestoreInitialContentOffsetAfterCrash
>   WKWebView.SnapshotImageLargeAsyncDecoding
> 
> Tests that timed out:
>   QuickLook.NavigationDelegate

Looks like fast/loader/javascript-url-iframe-remove-on-navigate-async-delegate.html was flaky too.
Comment 137 Chris Dumez 2018-03-21 10:14:04 PDT
Created attachment 336204 [details]
Patch
Comment 138 Chris Dumez 2018-03-21 10:18:23 PDT
Created attachment 336205 [details]
Patch
Comment 139 Chris Dumez 2018-03-21 10:53:52 PDT
Created attachment 336210 [details]
Patch
Comment 140 WebKit Commit Bot 2018-03-21 15:28:56 PDT
Comment on attachment 336210 [details]
Patch

Clearing flags on attachment: 336210

Committed r229831: <https://trac.webkit.org/changeset/229831>
Comment 141 WebKit Commit Bot 2018-03-21 15:28:59 PDT
All reviewed patches have been landed.  Closing bug.
Comment 142 Ryan Haddad 2018-03-21 17:07:59 PDT
Looks like we have another API test issue:

Tests that timed out:
  ProcessSwap.Basic

https://build.webkit.org/builders/Apple%20High%20Sierra%20Release%20WK1%20%28Tests%29/builds/4121
Comment 144 Chris Dumez 2018-03-21 18:18:26 PDT
(In reply to Ryan Haddad from comment #143)
> Also,
> fast/loader/javascript-url-iframe-remove-on-navigate-async-delegate.html
> seems to fail again:
> 
> https://build.webkit.org/results/Apple%20Sierra%20Release%20WK2%20(Tests)/
> r229832%20(8291)/results.html
> https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.
> html#showAllRuns=true&tests=fast%2Floader%2Fjavascript-url-iframe-remove-on-
> navigate-async-delegate.html

Looking.
Comment 145 Chris Dumez 2018-03-21 18:22:19 PDT
(In reply to Ryan Haddad from comment #142)
> Looks like we have another API test issue:
> 
> Tests that timed out:
>   ProcessSwap.Basic
> 
> https://build.webkit.org/builders/
> Apple%20High%20Sierra%20Release%20WK1%20%28Tests%29/builds/4121

This is a new test that was just added by Brady. It looks like it crashes in debug:
SHOULD NEVER BE REACHED
./loader/DocumentLoader.cpp(901) : void WebCore::DocumentLoader::continueAfterContentPolicy(WebCore::PolicyAction)
1   0x7f7aaf68d WTFCrash
2   0x7ea5966d7 WebCore::DocumentLoader::continueAfterContentPolicy(WebCore::PolicyAction)
3   0x7ea5bbc95 WebCore::DocumentLoader::responseReceived(WebCore::ResourceResponse const&, WTF::CompletionHandler<void ()>&&)::$_7::operator()(WebCore::PolicyAction) const
4   0x7ea5bbb2a WTF::Function<void (WebCore::PolicyAction)>::CallableWrapper<WebCore::DocumentLoader::responseReceived(WebCore::ResourceResponse const&, WTF::CompletionHandler<void ()>&&)::$_7>::call(WebCore::PolicyAction)
5   0x104bf45d1 WTF::Function<void (WebCore::PolicyAction)>::operator()(WebCore::PolicyAction) const
6   0x1053a31d7 WebKit::WebFrame::didReceivePolicyDecision(unsigned long long, WebCore::PolicyAction, unsigned long long, WebKit::DownloadID, std::optional<WebKit::WebsitePoliciesData>&&)
7   0x1054cf8dc WebKit::WebPage::didReceivePolicyDecision(unsigned long long, unsigned long long, WebCore::PolicyAction, unsigned long long, WebKit::DownloadID const&, std::optional<WebKit::WebsitePoliciesData>&&)
8   0x1055655f7 void IPC::callMemberFunctionImpl<WebKit::WebPage, void (WebKit::WebPage::*)(unsigned long long, unsigned long long, WebCore::PolicyAction, unsigned long long, WebKit::DownloadID const&, std::optional<WebKit::WebsitePoliciesData>&&), std::__1::tuple<unsigned long long, unsigned long long, WebCore::PolicyAction, unsigned long long, WebKit::DownloadID, std::optional<WebKit::WebsitePoliciesData> >, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul>(WebKit::WebPage*, void (WebKit::WebPage::*)(unsigned long long, unsigned long long, WebCore::PolicyAction, unsigned long long, WebKit::DownloadID const&, std::optional<WebKit::WebsitePoliciesData>&&), std::__1::tuple<unsigned long long, unsigned long long, WebCore::PolicyAction, unsigned long long, WebKit::DownloadID, std::optional<WebKit::WebsitePoliciesData> >&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul>)
9   0x105564610 void IPC::callMemberFunction<WebKit::WebPage, void (WebKit::WebPage::*)(unsigned long long, unsigned long long, WebCore::PolicyAction, unsigned long long, WebKit::DownloadID const&, std::optional<WebKit::WebsitePoliciesData>&&), std::__1::tuple<unsigned long long, unsigned long long, WebCore::PolicyAction, unsigned long long, WebKit::DownloadID, std::optional<WebKit::WebsitePoliciesData> >, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul> >(std::__1::tuple<unsigned long long, unsigned long long, WebCore::PolicyAction, unsigned long long, WebKit::DownloadID, std::optional<WebKit::WebsitePoliciesData> >&&, WebKit::WebPage*, void (WebKit::WebPage::*)(unsigned long long, unsigned long long, WebCore::PolicyAction, unsigned long long, WebKit::DownloadID const&, std::optional<WebKit::WebsitePoliciesData>&&))
10  0x1055527cf void IPC::handleMessage<Messages::WebPage::DidReceivePolicyDecision, WebKit::WebPage, void (WebKit::WebPage::*)(unsigned long long, unsigned long long, WebCore::PolicyAction, unsigned long long, WebKit::DownloadID const&, std::optional<WebKit::WebsitePoliciesData>&&)>(IPC::Decoder&, WebKit::WebPage*, void (WebKit::WebPage::*)(unsigned long long, unsigned long long, WebCore::PolicyAction, unsigned long long, WebKit::DownloadID const&, std::optional<WebKit::WebsitePoliciesData>&&))
11  0x10554a0c2 WebKit::WebPage::didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&)
12  0x1054d572e WebKit::WebPage::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
13  0x1054d5774 non-virtual thunk to WebKit::WebPage::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
14  0x104cc3c08 IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&)
15  0x105720fad WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
16  0x104bb5943 IPC::Connection::dispatchMessage(IPC::Decoder&)
17  0x104baaf28 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)
18  0x104bb5f4a IPC::Connection::dispatchOneMessage()
19  0x104bce3dd IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14::operator()()
20  0x104bce339 WTF::Function<void ()>::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14>::call()
21  0x7f7ad42eb WTF::Function<void ()>::operator()() const
22  0x7f7b25b73 WTF::RunLoop::performWork()
23  0x7f7b26474 WTF::RunLoop::performWork(void*)
24  0x7fff39862a61 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
25  0x7fff3991c47c __CFRunLoopDoSource0
26  0x7fff398454c0 __CFRunLoopDoSources0
27  0x7fff3984493d __CFRunLoopRun
28  0x7fff398441a3 CFRunLoopRunSpecific
29  0x7fff38b2cd96 RunCurrentEventLoopInMode
30  0x7fff38b2ca0f ReceiveNextEventCommon
31  0x7fff38b2c884 _BlockUntilNextEventMatchingListInModeWithFilter
Comment 146 Chris Dumez 2018-03-21 18:29:53 PDT
Comment on attachment 336210 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=336210&action=review

> Source/WebKit/UIProcess/WebPageProxy.cpp:-2377
> -        return;

My patch conflicted with Brady's and I do not think I resolved the conflict correctly. It seems we used to return early here if we were deciding a policy for a response. Therefore, Brady's code below would only be called for for navigation policy decisions. However, now it is called for both :(
Comment 147 Chris Dumez 2018-03-21 18:41:33 PDT
(In reply to Ryan Haddad from comment #142)
> Looks like we have another API test issue:
> 
> Tests that timed out:
>   ProcessSwap.Basic
> 
> https://build.webkit.org/builders/
> Apple%20High%20Sierra%20Release%20WK1%20%28Tests%29/builds/4121

I have a patch for this one at https://bugs.webkit.org/show_bug.cgi?id=183884.
Comment 148 Chris Dumez 2018-03-21 18:43:46 PDT
(In reply to Ryan Haddad from comment #143)
> Also,
> fast/loader/javascript-url-iframe-remove-on-navigate-async-delegate.html
> seems to fail again:
> 
> https://build.webkit.org/results/Apple%20Sierra%20Release%20WK2%20(Tests)/
> r229832%20(8291)/results.html
> https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.
> html#showAllRuns=true&tests=fast%2Floader%2Fjavascript-url-iframe-remove-on-
> navigate-async-delegate.html

Will deal with this via https://bugs.webkit.org/show_bug.cgi?id=183885.
Comment 149 mitz 2018-03-31 01:29:44 PDT
(In reply to Alex Christensen from comment #0)
> Make policy decisions asynchronous

Can someone please explain what this means?

The reason I’m puzzled is that in the WebKit API, clients have always been able to make policy decisions asynchronously (in the legacy API, using a WebPolicyDecisionListener, in the modern API, using a decision handler block), and the web view has always remained responsive and interactive while waiting for the client to make its decision.

So it doesn’t sound like “make policy decisions asynchronous” refers to new API or new behavior of the existing API. What is it about, then?

Thanks!
Comment 150 Chris Dumez 2018-03-31 09:04:23 PDT
(In reply to mitz from comment #149)
> (In reply to Alex Christensen from comment #0)
> > Make policy decisions asynchronous
> 
> Can someone please explain what this means?
> 
> The reason I’m puzzled is that in the WebKit API, clients have always been
> able to make policy decisions asynchronously (in the legacy API, using a
> WebPolicyDecisionListener, in the modern API, using a decision handler
> block), and the web view has always remained responsive and interactive
> while waiting for the client to make its decision.
> 
> So it doesn’t sound like “make policy decisions asynchronous” refers to new
> API or new behavior of the existing API. What is it about, then?
> 
> Thanks!

I responded on the other bug you commented on.