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