[webkit-reviews] review granted: [Bug 57368] WebKit2: Support setting the client certificate on Windows : [Attachment 87378] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 29 11:52:52 PDT 2011
Darin Adler <darin at apple.com> has granted Jeff Miller <jeffm at apple.com>'s
request for review:
Bug 57368: WebKit2: Support setting the client certificate on Windows
https://bugs.webkit.org/show_bug.cgi?id=57368
Attachment 87378: Patch
https://bugs.webkit.org/attachment.cgi?id=87378&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=87378&action=review
I’m not sure that this is following best practices for platform-specific
functions. All those empty ones that say ASSERT_NOT_REACHED seem wrong to me.
Can you find another example to check the idiom? Or ask Sam or Anders?
> Source/WebKit2/Shared/API/c/win/WKCertificateInfoWin.cpp:37
> + RefPtr<WebCertificateInfo> certificateInfo =
WebCertificateInfo::create(PlatformCertificateInfo(certificate));
> + return toAPI(certificateInfo.release().releaseRef());
Should use leakRef rather than releaseRef. The name releaseRef is deprecated, I
just haven’t had a chance to remove it yet. I also think writing this as a
1-liner would be better.
> Source/WebKit2/WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:34
> +#if USE(CFNETWORK)
> +#include <WebCore/CertificateCFWin.h>
> +#endif
Conditional includes should go in a separate paragraph after the rest of the
includes.
> Source/WebKit2/WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:114
> + RetainPtr<CFDataRef> certificate =
WebCore::copyCertificateToData(certificateChain.first());
> + ResourceHandle::setClientCertificate(host, certificate.get());
I think this would read better as a one-liner.
More information about the webkit-reviews
mailing list