[Webkit-unassigned] [Bug 192375] HTTPS Upgrade: Figure out if/how to tell clients that the HTTPS upgrade happened

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 10 12:59:19 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=192375

--- Comment #27 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 356978
  --> https://bugs.webkit.org/attachment.cgi?id=356978
Patch

It further improves.
Some suggestions below.

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

> Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:144
> +        if (WTF::holds_alternative<ResourceError>(result)) {

Let's use switchOn here and in the other cases.

> Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:154
> +        if (WTF::holds_alternative<RedirectionTriplet>(result)) {

I would put this check as second, we usually do the rare cases first.

> Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:157
> +            handler(RedirectionTriplet { WTFMove(request), WTFMove(triplet.redirectRequest), WTFMove(redirectResponse) });

You should be able to write it as:
handler(WTFMove(triplet))

> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:210
> +            if (WTF::holds_alternative<NetworkLoadChecker::RedirectionTriplet>(result)) {

Ditto for the ordering.

> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:212
> +                auto triplet = WTF::get<NetworkLoadChecker::RedirectionTriplet>(result);

auto& would be better if possible, or WTFMove(WTF::get...).

> Source/WebKit/NetworkProcess/PingLoad.cpp:70
> +        if (WTF::holds_alternative<NetworkLoadChecker::RedirectionTriplet>(result)) {

I would put it as second in the list.

> Source/WebKit/NetworkProcess/PingLoad.cpp:71
> +            NetworkLoadChecker::RedirectionTriplet triplet = WTF::get<NetworkLoadChecker::RedirectionTriplet>(result);

auto& here as well.

> Source/WebKit/NetworkProcess/PingLoad.cpp:73
>              return;

Las return is not needed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181210/c67431b0/attachment.html>


More information about the webkit-unassigned mailing list