Make more use of smart pointers.
Pull request: https://github.com/WebKit/WebKit/pull/16737
Committed 266958@main (69ad827a78b7): <https://commits.webkit.org/266958@main> Reviewed commits have been landed. Closing PR #16737 and removing active labels.
<rdar://problem/113986710>