Bug 167982 - Allow speculative redirects
Summary: Allow speculative redirects
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: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-02-08 03:45 PST by Antti Koivisto
Modified: 2017-02-10 04:46 PST (History)
6 users (show)

See Also:


Attachments
patch (13.61 KB, patch)
2017-02-08 03:58 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2017-02-08 03:45:41 PST
If speculative loader hits a redirect it will drop it on the floor. We should use them instead.
Comment 1 Antti Koivisto 2017-02-08 03:58:29 PST
Created attachment 300889 [details]
patch
Comment 2 Andreas Kling 2017-02-08 06:17:44 PST
Comment on attachment 300889 [details]
patch

r=me
Comment 3 WebKit Commit Bot 2017-02-08 07:11:40 PST
Comment on attachment 300889 [details]
patch

Clearing flags on attachment: 300889

Committed r211869: <http://trac.webkit.org/changeset/211869>
Comment 4 WebKit Commit Bot 2017-02-08 07:11:44 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Ryan Haddad 2017-02-08 09:47:44 PST
This change appears to have caused LayoutTests to fail an assertion on macOS Debug WK2:

https://build.webkit.org/results/Apple%20Sierra%20Debug%20WK2%20(Tests)/r211869%20(1938)/results.html

ASSERTION FAILED: !m_platformRequestUpdated
/Volumes/Data/slave/sierra-debug/build/WebKitBuild/Debug/WebCore.framework/PrivateHeaders/ResourceRequestBase.h(323) : void WebCore::ResourceRequestBase::encodeWithoutPlatformData(Encoder &) const [Encoder = WTF::Persistence::Encoder]
1   0x110f8390d WTFCrash
2   0x10c0ee2f5 void WebCore::ResourceRequestBase::encodeWithoutPlatformData<WTF::Persistence::Encoder>(WTF::Persistence::Encoder&) const
3   0x10c0edfc1 WebKit::NetworkCache::Entry::encodeAsStorageRecord() const
4   0x10c0de1b1 WebKit::NetworkCache::Cache::storeRedirect(WebCore::ResourceRequest const&, WebCore::ResourceResponse const&, WebCore::ResourceRequest const&)
5   0x10c216520 WebKit::NetworkResourceLoader::willSendRedirectedRequest(WebCore::ResourceRequest&&, WebCore::ResourceRequest&&, WebCore::ResourceResponse&&)
6   0x10c1c579f WebKit::NetworkLoad::sharedWillSendRedirectedRequest(WebCore::ResourceRequest&&, WebCore::ResourceResponse&&)
7   0x10c1c5cf5 WebKit::NetworkLoad::willPerformHTTPRedirection(WebCore::ResourceResponse&&, WebCore::ResourceRequest&&, WTF::Function<void (WebCore::ResourceRequest const&)>&&)
8   0x10c1bd91a WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection(WebCore::ResourceResponse&&, WebCore::ResourceRequest&&, WTF::Function<void (WebCore::ResourceRequest const&)>&&)
9   0x10c223719 -[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]
10  0x7fff8605ad97 __86-[NSURLSession delegate_task:willPerformHTTPRedirection:newRequest:completionHandler:]_block_invoke
11  0x7fff8874a2d9 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__
12  0x7fff88749fbc -[NSBlockOperation main]
13  0x7fff887486e4 -[__NSOperationInternal _start:]
14  0x7fff8874459b __NSOQSchedule_f
15  0x7fff9c2bd0b8 _dispatch_client_callout
16  0x7fff9c2cab4b _dispatch_main_queue_callback_4CF
17  0x7fff86d35669 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
18  0x7fff86cf665d __CFRunLoopRun
19  0x7fff86cf5b54 CFRunLoopRunSpecific
20  0x7fff88728612 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
21  0x7fff887284ea -[NSRunLoop(NSRunLoop) run]
22  0x7fff9c55789b _xpc_objc_main
23  0x7fff9c5562e4 xpc_main
24  0x10bea218d main
25  0x7fff9c2f3255 start
26  0x1
LEAK: 11 WebProcessPool
LEAK: 13 WebPageProxy
Comment 6 Ryan Haddad 2017-02-08 09:54:22 PST
Reverted r211869 for reason:

This change caused assertion failures on macOS WK2.

Committed r211882: <http://trac.webkit.org/changeset/211882>
Comment 7 Antti Koivisto 2017-02-08 13:15:31 PST
Relanded in https://trac.webkit.org/r211894 (with a fix)
Comment 8 Radar WebKit Bug Importer 2017-02-10 04:46:53 PST
<rdar://problem/30463396>