Bug 252856 - Style checker should check for incorrect adoptCF() and adoptNS() usage.
Summary: Style checker should check for incorrect adoptCF() and adoptNS() usage.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-23 13:37 PST by Simon Fraser (smfr)
Modified: 2023-11-27 15:05 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2023-02-23 13:37:02 PST
Style bot should have caught the issue fixed in bug 252629.
Comment 1 Radar WebKit Bug Importer 2023-03-02 13:37:22 PST
<rdar://problem/106161245>
Comment 2 Simon Fraser (smfr) 2023-04-12 20:00:54 PDT
This would have caught https://github.com/WebKit/WebKit/pull/12670#pullrequestreview-1382477564
Comment 3 Simon Fraser (smfr) 2023-11-27 12:02:32 PST
Pull request: https://github.com/WebKit/WebKit/pull/20946
Comment 4 Darin Adler 2023-11-27 13:39:09 PST
We will also need the more challenging opposite checker, which checks for use of these function name patterns *without* adoptCF/NS.
Comment 5 Simon Fraser (smfr) 2023-11-27 14:25:22 PST
I think that's impossible to do in the style checker, which doesn't know if a function returns a smart pointer or retained raw pointer.
Comment 6 Darin Adler 2023-11-27 15:05:44 PST
Bummer. I wonder if there’s a way to make it work at least with platform function names, somehow a convention for functions inside WebKit vs. functions from the C and Objective-C functions from CF and Cocoa.