Bug 183534 - [WebAuthn] Optimize LocalAuthenticator
Summary: [WebAuthn] Optimize LocalAuthenticator
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jiewen Tan
URL:
Keywords: InRadar
Depends on:
Blocks: 181943
  Show dependency treegraph
 
Reported: 2018-03-09 15:54 PST by Jiewen Tan
Modified: 2020-04-30 15:27 PDT (History)
6 users (show)

See Also:


Attachments
Patch (41.00 KB, patch)
2020-04-27 15:42 PDT, Jiewen Tan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiewen Tan 2018-03-09 15:54:13 PST
Optimize LocalAuthenticator.
Comment 1 Jiewen Tan 2018-03-09 15:56:33 PST
Includes:
1) Optimize the nested callbacks.
2) Don't let authData throttle.
3) Test IDN of RP.ID.
Comment 2 Jiewen Tan 2018-03-14 22:28:46 PDT
4) Figure out a better way to pass variables to objc block in another thread.
5) Optimize threading.
6) Replace weak pointers with other mechanism as they don't work in another thread.
Comment 3 Jiewen Tan 2018-03-21 17:02:30 PDT
7) Change little endian bytes (ARM and x86 default) to big endian as requested by the spec.
8) Better manage lifetime of LAContext passed around different threads. A solution could be all LAContext objects are stored in a map managed by LocalAuthenticator, and freed by callbacks happened in mainthread. That means using callOnMainThread to executing every callbacks. This will also resolve the WeakPtr issue.
9) Unify callbacks and use variant to handle exceptions.
Comment 4 Jiewen Tan 2018-03-27 11:47:27 PDT
10) Move constants from LocalAuthenticator.mm to a separate header.
Comment 5 Radar WebKit Bug Importer 2018-08-15 17:09:23 PDT
<rdar://problem/43357408>
Comment 6 Jiewen Tan 2018-09-08 20:57:04 PDT
Fixed 9) in Bug 189277.
Comment 7 Jiewen Tan 2018-09-21 22:09:16 PDT
Fixed 1), 4), 5), 6), and 8) in Bug 189279.
Comment 8 Jiewen Tan 2019-01-04 13:22:39 PST
2) and 7) are fixed in Bug 193150.
Comment 9 Jiewen Tan 2020-02-19 18:29:51 PST
11) Consider using initWithBytesNoCopy with toNSData().
Comment 10 Jiewen Tan 2020-03-08 22:03:43 PDT
12) Combine m_assertionResponses and m_existingCredentials.
Comment 11 Jiewen Tan 2020-03-08 22:04:34 PDT
13) Find a better way of comparing credential id. Doing it with array seems fine given the list should be small.
Comment 12 Jiewen Tan 2020-03-22 20:50:03 PDT
14) Invalidate the LAContext when LocalConnection is destroyed.
Comment 13 Jiewen Tan 2020-04-21 11:42:49 PDT
15) Sort credentials according to LRU before returning to UI clients.
Comment 14 Jiewen Tan 2020-04-27 15:42:04 PDT
Created attachment 397752 [details]
Patch
Comment 15 Brent Fulgham 2020-04-30 13:03:48 PDT
Comment on attachment 397752 [details]
Patch

r=me
Comment 16 Jiewen Tan 2020-04-30 15:22:13 PDT
Comment on attachment 397752 [details]
Patch

Thanks Brent for the r+.
Comment 17 EWS 2020-04-30 15:27:07 PDT
Committed r260970: <https://trac.webkit.org/changeset/260970>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 397752 [details].