Make use of more smart pointers as warned by the clang static analyzer.
Pull request: https://github.com/WebKit/WebKit/pull/17463
Committed 267704@main (973b655f2b72): <https://commits.webkit.org/267704@main> Reviewed commits have been landed. Closing PR #17463 and removing active labels.
<rdar://problem/115080863>