| Summary: | [WebAuthn] Ensure requestPin callback on main thread | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | pascoe <pascoe> | ||||||
| Component: | WebKit Misc. | Assignee: | pascoe <pascoe> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | bfulgham, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
pascoe@apple.com
2022-04-07 15:00:47 PDT
Created attachment 456974 [details]
Patch
Comment on attachment 456974 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=456974&action=review r=me > Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm:138 > + completionHandler(pin.get()); I recommend adding a RELEASE_ASSERT(isMainThread()) to the logic of the completion handler to avoid future mistakes. Comment on attachment 456974 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=456974&action=review >> Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm:138 >> + completionHandler(pin.get()); > > I recommend adding a RELEASE_ASSERT(isMainThread()) to the logic of the completion handler to avoid future mistakes. Actually, I see you are using the more-correct RunLoop::isMain() in the caller, so no other action needed (except perhaps making it a RELEASE_ASSERT, which might be important to prevent UIKit code from ever running on a background thread. Created attachment 457094 [details]
Patch for landing
Committed r292710 (249501@main): <https://commits.webkit.org/249501@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 457094 [details]. |