Bug 240143 - [WebAuthn] Get rid of ASCAgentProxy instance after success/error/cancel
Summary: [WebAuthn] Get rid of ASCAgentProxy instance after success/error/cancel
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: pascoe@apple.com
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-05 15:58 PDT by pascoe@apple.com
Modified: 2022-05-06 11:00 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.98 KB, patch)
2022-05-05 16:05 PDT, pascoe@apple.com
no flags Details | Formatted Diff | Diff
Patch (3.99 KB, patch)
2022-05-05 16:50 PDT, pascoe@apple.com
no flags Details | Formatted Diff | Diff
Patch (3.99 KB, patch)
2022-05-05 17:08 PDT, pascoe@apple.com
no flags Details | Formatted Diff | Diff
Patch for landing (4.34 KB, patch)
2022-05-06 10:04 PDT, pascoe@apple.com
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pascoe@apple.com 2022-05-05 15:58:35 PDT
^
Comment 1 Radar WebKit Bug Importer 2022-05-05 15:58:44 PDT
<rdar://problem/92825715>
Comment 2 pascoe@apple.com 2022-05-05 16:05:35 PDT
Created attachment 458921 [details]
Patch
Comment 3 pascoe@apple.com 2022-05-05 16:50:32 PDT
Created attachment 458926 [details]
Patch
Comment 4 pascoe@apple.com 2022-05-05 17:08:10 PDT
Created attachment 458927 [details]
Patch
Comment 5 pascoe@apple.com 2022-05-05 17:08:24 PDT
rdar://91393607
Comment 6 Brent Fulgham 2022-05-06 09:42:16 PDT
Comment on attachment 458927 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=458927&action=review

r=me

> Source/WebKit/ChangeLog:12
> +        * UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:

Nit: This file should probably be called WebAuthenticatorCoordinatorProxyCocoa.mm (but that's an issue for another day).

> Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:450
> +                weakThis->m_proxy.clear();

Do we need to clear m_proxy in in the case of 'ASCCredentialRequestTypeNone' on line 438?

> Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:475
> +                weakThis->m_proxy.clear();

What if we do have a weakThis, but we do not have a daemonEndPoint. Do we need to clear weakThis->m_proxy on line 465, above? Are they guaranteed to pass through the 'cancel' logic?
Comment 7 pascoe@apple.com 2022-05-06 09:49:18 PDT
Comment on attachment 458927 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=458927&action=review

>> Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:450
>> +                weakThis->m_proxy.clear();
> 
> Do we need to clear m_proxy in in the case of 'ASCCredentialRequestTypeNone' on line 438?

We haven't set the m_proxy for the request yet here, so it shouldn't be necessary.

>> Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:475
>> +                weakThis->m_proxy.clear();
> 
> What if we do have a weakThis, but we do not have a daemonEndPoint. Do we need to clear weakThis->m_proxy on line 465, above? Are they guaranteed to pass through the 'cancel' logic?

If we don't get a daemonEndpoint it's likely something is wrong with the daemon. It does make sense to clear it here, will update.
Comment 8 pascoe@apple.com 2022-05-06 10:04:23 PDT
Created attachment 458960 [details]
Patch for landing
Comment 9 EWS 2022-05-06 11:00:41 PDT
Committed r293907 (250362@main): <https://commits.webkit.org/250362@main>

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