Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fc768e2e3c75b653f7fe182cf04923fe4ccae8b5
      
https://github.com/WebKit/WebKit/commit/fc768e2e3c75b653f7fe182cf04923fe4ccae8b5
  Author: Chris Dumez <[email protected]>
  Date:   2025-09-29 (Mon, 29 Sep 2025)

  Changed paths:
    M 
Source/WebKit/UIProcess/WebAuthentication/Cocoa/AuthenticationServicesForwardDeclarations.h
    M 
Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm

  Log Message:
  -----------
  Regression(300686@main) Refcounting of 
ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest is incorrect
https://bugs.webkit.org/show_bug.cgi?id=299845

Reviewed by David Kilzer.

In 300686@main, I incorrectly assumed that the static analysis was wrong and 
that
the `create` functions returning 
ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest
objects were returning a +1 refcount object which we needed to adopt. However,
this framework is using ARC and those functions are in fact returning
autoreleased objects.

Our code was already wrong pre-300686@main as we were adopting those objects.
However, we used to call leakRef() later on, which would avoid crashes. In
300686@main , I had dropped the leakRef() calls as they seemed unnecessary.

To address the issue, I stop calling `adoptNS()` and I drop the annotations
I had adopted in the forward declaration header. The framework is not able
to adopt those annotations as it would break other clients of these APIs.

* 
Source/WebKit/UIProcess/WebAuthentication/Cocoa/AuthenticationServicesForwardDeclarations.h:
* 
Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:
(WebKit::WebAuthenticatorCoordinatorProxy::requestsForRegistration):
(WebKit::WebAuthenticatorCoordinatorProxy::requestsForAssertion):

Canonical link: https://commits.webkit.org/300731@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to