Make use of more smart pointers as warned by the Clang static analyzer.
<rdar://problem/116161504>
Pull request: https://github.com/WebKit/WebKit/pull/18330
Committed 268632@main (8924915b4793): <https://commits.webkit.org/268632@main> Reviewed commits have been landed. Closing PR #18330 and removing active labels.