Bug 179503 - Make CachedResource::redirectReceived asynchronous
Summary: Make CachedResource::redirectReceived 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: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-11-09 12:02 PST by Alex Christensen
Modified: 2017-11-15 09:37 PST (History)
2 users (show)

See Also:


Attachments
Patch (27.72 KB, patch)
2017-11-09 12:04 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (27.73 KB, patch)
2017-11-09 12:55 PST, Alex Christensen
koivisto: review+
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-11-09 12:02:00 PST
Make CachedResource::redirectReceived asynchronous
Comment 1 Alex Christensen 2017-11-09 12:04:56 PST
Created attachment 326475 [details]
Patch
Comment 2 Alex Christensen 2017-11-09 12:55:17 PST
Created attachment 326479 [details]
Patch
Comment 3 Antti Koivisto 2017-11-10 10:55:12 PST
Comment on attachment 326479 [details]
Patch

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

> Source/WebCore/loader/SubresourceLoader.cpp:186
> +    auto callSuper = [this, protectedThis = makeRef(*this), redirectResponse] (CompletionHandler<void(ResourceRequest&&)>&& completionHandler, ResourceRequest&& newRequest) mutable {

"callSuper" is not a great name. Can you name this with something that describes what it is actually trying to accomplish?

> Source/WebCore/loader/cache/CachedRawResource.cpp:119
> +static void iterate(CachedResourceHandle<CachedRawResource>&& handle, CachedRawResourceClient& client, Vector<std::pair<ResourceRequest, ResourceResponse>>&& redirectsInReverseOrder, CompletionHandler<void(ResourceRequest&&)>&& completionHandler)

iterate over what?
Comment 4 Alex Christensen 2017-11-10 11:24:13 PST
(In reply to Antti Koivisto from comment #3)
> "callSuper" is not a great name. Can you name this with something that
> describes what it is actually trying to accomplish?
I renamed this to continueWillSendRequest.

> iterate over what?
I renamed these to iterateClients and iterateRedirects.

http://trac.webkit.org/r224699
Comment 5 Radar WebKit Bug Importer 2017-11-15 09:37:48 PST
<rdar://problem/35562097>