[webkit-reviews] review granted: [Bug 232977] _WKWebAuthenticationPanel should expose a way to encode CTAP commands : [Attachment 444029] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 12 14:12:25 PST 2021


David Kilzer (:ddkilzer) <ddkilzer at webkit.org> has granted Garrett Davidson
<garrett_davidson at apple.com>'s request for review:
Bug 232977: _WKWebAuthenticationPanel should expose a way to encode CTAP
commands
https://bugs.webkit.org/show_bug.cgi?id=232977

Attachment 444029: Patch

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




--- Comment #10 from David Kilzer (:ddkilzer) <ddkilzer at webkit.org> ---
Comment on attachment 444029
  --> https://bugs.webkit.org/attachment.cgi?id=444029
Patch

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

r=me
Let me know if you need cq+ as well.

> Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:648
> +    RetainPtr<NSData> clientDataJSON;
> +
> +#if ENABLE(WEB_AUTHN)
> +    clientDataJSON = produceClientDataJson(type, challenge, origin);
> +#endif
> +
> +    return clientDataJSON.autorelease();

Another way to write this would be:

#if ENABLE(WEB_AUTHN)
    return produceClientDataJson(type, challenge, origin).autorelease();
#else
    return nullptr;
#endif

This does NOT need to be changed to land the patch, but it makes it clearer
what the code path does when ENABLE(WEB_AUTHN) evaluates to false.

(Similar change could be done for the other methods, too, but no need to change
this to land it.)


More information about the webkit-reviews mailing list