[webkit-reviews] review denied: [Bug 218893] [WebAuthn] Implement SPI for AuthenticationServices.Framework : [Attachment 414520] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 19 11:18:14 PST 2020
Alex Christensen <achristensen at apple.com> has denied Jiewen Tan
<jiewen_tan at apple.com>'s request for review:
Bug 218893: [WebAuthn] Implement SPI for AuthenticationServices.Framework
https://bugs.webkit.org/show_bug.cgi?id=218893
Attachment 414520: Patch
https://bugs.webkit.org/attachment.cgi?id=414520&action=review
--- Comment #12 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 414520
--> https://bugs.webkit.org/attachment.cgi?id=414520
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=414520&action=review
> Source/WebKit/UIProcess/API/APIWebAuthenticationPanel.cpp:46
> + , m_client(WTF::makeUniqueRef<WebAuthenticationPanelClient>())
WTF:: unnecessary
> Source/WebKit/UIProcess/API/APIWebAuthenticationPanel.cpp:51
> + : m_client(WTF::makeUniqueRef<WebAuthenticationPanelClient>())
ditto
> Source/WebKit/UIProcess/API/APIWebAuthenticationPanel.h:56
> + using Respond = Variant<Ref<WebCore::AuthenticatorResponse>,
WebCore::ExceptionData>;
Response
> Source/WebKit/UIProcess/API/APIWebAuthenticationPanel.h:69
> + using TransportSet = HashSet<WebCore::AuthenticatorTransport,
WTF::IntHash<WebCore::AuthenticatorTransport>,
WTF::StrongEnumHashTraits<WebCore::AuthenticatorTransport>>;
Could this be an OptionSet? Ditto with all the
Vector<WebCore::AuthenticatorTransport>
> Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:199
> + at property (nullable, nonatomic, copy) NSNumber *timeout;
I would say this should be NSTimeInterval but there can be no timeout, hence
the nullable. The value backing this should probably be Optional<Seconds>
instead of Optional<unsigned> so that one can specify a fraction of a second.
> Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanelForTesting.h:39
> ++
(WebCore::PublicKeyCredentialCreationOptions)convertToCoreCreationOptionsWithOp
tions:(_WKPublicKeyCredentialCreationOptions *)options
WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
I think it would be better if we just exposed the things we want to query in an
ObjC API, like exposing the icon instead of a WebCore C++ structure through an
ObjC API.
> Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:1449
> + RetainPtr<_WKPublicKeyCredentialCreationOptions> options =
[[_WKPublicKeyCredentialCreationOptions alloc] initWithRp:rp.get()
user:user.get() pubKeyCredParams:pubKeyCredParams];
adoptNS or this is a memory leak. Same everywhere else in this test and other
tests where we alloc init... without an autorelease or release.
> Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:1775
> + RetainPtr<NSData> nsHash = [NSData dataWithBytes:hash
length:sizeof(hash)];
This is actually not a memory leak because dataWithBytes:length: returns an
autoreleased NSData*
More information about the webkit-reviews
mailing list