Bug 314781
| Summary: | Use protect() instead of Ref { } in style code | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ruthvik Konda <rkonda2> |
| Component: | WebKit Misc. | Assignee: | Ruthvik Konda <rkonda2> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ruthvik Konda
Source/WebCore/style contains 10 instances of `Ref { }` brace-initialized
smart pointer temporaries. As part of the codebase-wide transition to the
`protect()` free function (which SaferCPP prefers for lifetime extension in
inline expressions, function arguments, return values, and lambda captures),
these should be updated.
Of the 10 instances, 7 are convertible to `protect()` directly (inline
temporaries, function args, return values). The remaining 3 are local-variable
initializations where the style checker (`safercpp/protected_getter_for_init`)
forbids `protect()`; those should be converted to direct brace-init form
(`Ref x { y };`) instead.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/177033111>
Ruthvik Konda
Pull request: https://github.com/WebKit/WebKit/pull/64895
EWS
Committed 313298@main (772188b773db): <https://commits.webkit.org/313298@main>
Reviewed commits have been landed. Closing PR #64895 and removing active labels.