[webkit-reviews] review granted: [Bug 237234] Add SPI _WKDataTask : [Attachment 453294] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 28 23:44:22 PST 2022


Tim Horton <thorton at apple.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 237234: Add SPI _WKDataTask
https://bugs.webkit.org/show_bug.cgi?id=237234

Attachment 453294: Patch

https://bugs.webkit.org/attachment.cgi?id=453294&action=review




--- Comment #6 from Tim Horton <thorton at apple.com> ---
Comment on attachment 453294
  --> https://bugs.webkit.org/attachment.cgi?id=453294
Patch

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

> Source/WebKit/NetworkProcess/cocoa/WKURLSessionTaskDelegate.mm:76
> +- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task
willPerformHTTPRedirection:(NSHTTPURLResponse *)response
newRequest:(NSURLRequest *)request completionHandler:(void (^)(NSURLRequest *
_Nullable))completionHandler

No nullability in implementation files (because it's viral).

> Source/WebKit/UIProcess/API/APIDataTask.cpp:56
> +    , m_client(DataTaskClient::create()) { }

Odd place for those curly braces

> Source/WebKit/UIProcess/API/APIDataTaskClient.h:50
> +    virtual void willPerformHTTPRedirection(DataTask&,
WebCore::ResourceResponse&&, WebCore::ResourceRequest&&,
CompletionHandler<void(bool)>&& completionHandler) const {
completionHandler(true); }

Is `HTTP` proper WebKit style or `Http`? (I like the all-caps version but I
think WebKit style does not)

> Source/WebKit/UIProcess/API/Cocoa/_WKDataTaskDelegate.h:51
> +- (void)dataTask:(_WKDataTask *)dataTask didCompleteWithError:(nullable
NSError *)error;

Why both nullable and _Nullable?


More information about the webkit-reviews mailing list