Summary: | [WebAuthn] Move the async code from WebAuthenticationPanelClient to AuthenticatorManager | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jiewen Tan <jiewen_tan> | ||||||
Component: | WebKit Misc. | Assignee: | Jiewen Tan <jiewen_tan> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | achristensen, commit-queue, jiewen_tan, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 181943 | ||||||||
Attachments: |
|
Description
Jiewen Tan
2020-01-14 12:10:49 PST
Created attachment 390156 [details]
Patch
Comment on attachment 390156 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=390156&action=review > Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:281 > + dispatchPanelClientCall([retries, completionHandler = WTFMove(completionHandler)] (const API::WebAuthenticationPanel& panel) mutable { If m_pendingRequestData.panel.get() returns null, this CompletionHandler will not be called. That's a problem that will cause hangs. > Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:289 > + responseVector.reserveCapacity(responses.size()); reserveInitialCapacity Comment on attachment 390156 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=390156&action=review Thanks for reviewing my patch, Alex. >> Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:281 >> + dispatchPanelClientCall([retries, completionHandler = WTFMove(completionHandler)] (const API::WebAuthenticationPanel& panel) mutable { > > If m_pendingRequestData.panel.get() returns null, this CompletionHandler will not be called. That's a problem that will cause hangs. Well, the panel should always exist once the operations starts, see: handleRequest() -> runPanel() -> startDiscovery() -> operation starts if there is available authenticators. That's a simple null check. Also, there is a timer (m_requestTimeOutTimer) for every operation, therefore there should be no hangs. >> Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:289 >> + responseVector.reserveCapacity(responses.size()); > > reserveInitialCapacity Fixed. Created attachment 390277 [details]
Patch
Comment on attachment 390277 [details]
Patch
Thanks Alex for r+ this patch. I don't think EWS failures are related. cq+ regardless.
The commit-queue encountered the following flaky tests while processing attachment 390277 [details]: editing/spelling/spellcheck-attribute.html bug 206178 (authors: g.czajkowski@samsung.com, mark.lam@apple.com, and rniwa@webkit.org) The commit-queue is continuing to process your patch. Comment on attachment 390277 [details] Patch Clearing flags on attachment: 390277 Committed r256238: <https://trac.webkit.org/changeset/256238> All reviewed patches have been landed. Closing bug. |