Bug 256311
| Summary: | RetainPtr<>::leakRef() should have NS/CF_RETURNS_RETAINED attributes | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> |
| Component: | Web Template Framework | Assignee: | David Kilzer (:ddkilzer) <ddkilzer> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
David Kilzer (:ddkilzer)
RetainPtr<>::leakRef() should have NS/CF_RETURNS_RETAINED attributes.
This will let the clang static analyzer do a better job of detecting leaks.
The trick to making this work is using `template<typename U = T>` to allow for template specialization and SFINAE without using the template type (`T`) for the entire class, as noted here:
<https://stackoverflow.com/questions/11531989/what-happened-to-my-sfinae-redux-conditional-template-class-members>
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/108895655>
David Kilzer (:ddkilzer)
Pull request: https://github.com/WebKit/WebKit/pull/13451
EWS
Committed 263742@main (611c1a1ceeaf): <https://commits.webkit.org/263742@main>
Reviewed commits have been landed. Closing PR #13451 and removing active labels.