| Summary: | [WebAuthN] Polish WebAuthN auto-test environment | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jiewen Tan <jiewen_tan> | ||||||||||
| Component: | WebCore Misc. | Assignee: | Jiewen Tan <jiewen_tan> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | alex.gaynor, bfulgham, cdumez, commit-queue, jiewen_tan, webkit-bug-importer, youennf | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | WebKit Nightly Build | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Bug Depends on: | |||||||||||||
| Bug Blocks: | 182769 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Jiewen Tan
2018-09-04 16:31:58 PDT
Created attachment 351016 [details]
Patch
Created attachment 351019 [details]
Patch
Comment on attachment 351019 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351019&action=review r=me > Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp:582 > + MockWebAuthenticationConfiguration::Local local; Any reason we are using a local variable instead of assigning straight into configuration.local? > Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:77 > + if (!configuration.local.value().acceptAuthentication) { Cannot we use onfiguration.local->acceptAuthentication ? > Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:90 > + if (!configuration.local.value().acceptAuthentication) { ditto. > Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:105 > + if (!configuration.local.value().acceptAttestation) { ditto. > Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:118 > + (__bridge CFDataRef)adoptNS([[NSData alloc] initWithBase64EncodedString:configuration.local.value().privateKeyBase64 options:NSDataBase64DecodingIgnoreUnknownCharacters]).get(), ditto. > Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.cpp:45 > + if (!m_configuration.local) return !!m_configuration.local; ? Comment on attachment 351019 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351019&action=review Thanks Chris for r+ my patch. >> Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp:582 >> + MockWebAuthenticationConfiguration::Local local; > > Any reason we are using a local variable instead of assigning straight into configuration.local? configuration.local is a std::optional. How? >> Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:77 >> + if (!configuration.local.value().acceptAuthentication) { > > Cannot we use onfiguration.local->acceptAuthentication ? Sure. >> Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:90 >> + if (!configuration.local.value().acceptAuthentication) { > > ditto. Fixed. >> Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:105 >> + if (!configuration.local.value().acceptAttestation) { > > ditto. Fixed. >> Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:118 >> + (__bridge CFDataRef)adoptNS([[NSData alloc] initWithBase64EncodedString:configuration.local.value().privateKeyBase64 options:NSDataBase64DecodingIgnoreUnknownCharacters]).get(), > > ditto. Fixed. >> Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.cpp:45 >> + if (!m_configuration.local) > > return !!m_configuration.local; ? I don't think so. Comment on attachment 351019 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351019&action=review >>> Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp:582 >>> + MockWebAuthenticationConfiguration::Local local; >> >> Any reason we are using a local variable instead of assigning straight into configuration.local? > > configuration.local is a std::optional. How? Ah, I missed that it was an optional. Please disregard this comment. >>> Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.cpp:45 >>> + if (!m_configuration.local) >> >> return !!m_configuration.local; ? > > I don't think so. Why not? :) Created attachment 351134 [details]
Patch for landing
Comment on attachment 351019 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351019&action=review >>>> Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.cpp:45 >>>> + if (!m_configuration.local) >>> >>> return !!m_configuration.local; ? >> >> I don't think so. > > Why not? :) I was thinking you suggested me to replace !m_configuration.local with !!m_configuration.local. lol. Yup. Why not. Created attachment 351137 [details]
Patch for landing
Comment on attachment 351137 [details] Patch for landing Clearing flags on attachment: 351137 Committed r236625: <https://trac.webkit.org/changeset/236625> |