Bug 299845
| Summary: | Regression(300686@main) Refcounting of ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest is incorrect | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> |
| Component: | WebKit2 | Assignee: | Chris Dumez <cdumez> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | kkinnunen, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Chris Dumez
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Chris Dumez
Pull request: https://github.com/WebKit/WebKit/pull/51541
EWS
Committed 300731@main (fc768e2e3c75): <https://commits.webkit.org/300731@main>
Reviewed commits have been landed. Closing PR #51541 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/161622647>