[webkit-reviews] review granted: [Bug 188701] NetworkLoad::didReceiveResponse should pass its completion handler to its client : [Attachment 347385] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 20 18:57:30 PDT 2018


Michael Catanzaro <mcatanzaro at igalia.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 188701: NetworkLoad::didReceiveResponse should pass its completion handler
to its client
https://bugs.webkit.org/show_bug.cgi?id=188701

Attachment 347385: Patch

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




--- Comment #8 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 347385
  --> https://bugs.webkit.org/attachment.cgi?id=347385
Patch

Good.

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

> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:462
> -	   return ShouldContinueDidReceiveResponse::Yes;
> +	   return completionHandler(PolicyAction::Use);

You're relying on the return type of the completion handler being void. Was
this an accident? Or return completionHandler() a sort of way to indicate
finality?

I don't like it myself... I would write:

    completionHandler(PolicyAction::Use);
    return;

> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:466
> -	   return ShouldContinueDidReceiveResponse::No;
> +	   return completionHandler(PolicyAction::Ignore);

Ditto.

> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:476
> -	       return ShouldContinueDidReceiveResponse::No;
> +	       return completionHandler(PolicyAction::Ignore);

Ditto.

> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:483
> -	   return ShouldContinueDidReceiveResponse::Yes;
> +	   return completionHandler(PolicyAction::Use);

Ditto.


More information about the webkit-reviews mailing list