[webkit-reviews] review denied: [Bug 175832] Make NetworkDataTaskClient completion handlers less error prone by introducing a wrapper for them : [Attachment 318768] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 22 10:58:11 PDT 2017


Alex Christensen <achristensen at apple.com> has denied Chris Dumez
<cdumez at apple.com>'s request for review:
Bug 175832: Make NetworkDataTaskClient completion handlers less error prone by
introducing a wrapper for them
https://bugs.webkit.org/show_bug.cgi?id=175832

Attachment 318768: Patch

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




--- Comment #3 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 318768
  --> https://bugs.webkit.org/attachment.cgi?id=318768
Patch

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

I think we should solve this problem instead by just making a wrapper of
WTF::Function that counts how many times it's called in a debug build and
asserts that it is called exactly once before it is destroyed

> Source/WebKit/NetworkProcess/NetworkDataTask.h:66
> +    NetworkCompletionHandler(HandlerType&& handler,
WTF::Function<void(HandlerType&)>&& defaultHandler)

This is strange.

> Source/WebKit/NetworkProcess/PingLoad.cpp:-108
> -	   completionHandler({ });

I think we should keep these in.

> Source/WebKit/NetworkProcess/capture/NetworkDataTaskReplay.cpp:206
> +    RedirectCompletionHandler handler = makeRedirectCompletionHandler([this,
protectedThis = makeRef(*this)] (const WebCore::ResourceRequest&
updatedRequest) {

auto redirectCompletionHandler


More information about the webkit-reviews mailing list