Bug 252856
Summary: | Style checker should check for incorrect adoptCF() and adoptNS() usage. | ||
---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
Component: | Tools / Tests | Assignee: | Simon Fraser (smfr) <simon.fraser> |
Status: | NEW | ||
Severity: | Normal | CC: | ap, darin, ddkilzer, simon.fraser, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=252629 https://bugs.webkit.org/show_bug.cgi?id=263538 |
Simon Fraser (smfr)
Style bot should have caught the issue fixed in bug 252629.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/106161245>
Simon Fraser (smfr)
This would have caught https://github.com/WebKit/WebKit/pull/12670#pullrequestreview-1382477564
Simon Fraser (smfr)
Pull request: https://github.com/WebKit/WebKit/pull/20946
Darin Adler
We will also need the more challenging opposite checker, which checks for use of these function name patterns *without* adoptCF/NS.
Simon Fraser (smfr)
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.
Darin Adler
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.