Make use of more smart pointers in these files.
Pull request: https://github.com/WebKit/WebKit/pull/17171
Committed 267429@main (787859b64949): <https://commits.webkit.org/267429@main> Reviewed commits have been landed. Closing PR #17171 and removing active labels.
<rdar://problem/114665792>