Use sandbox API to set sandbox state variable instead of relying on reading a preference value.
<rdar://problem/101772011>
Pull request: https://github.com/WebKit/WebKit/pull/5974
Committed 256236@main (33e4db9b9000): <https://commits.webkit.org/256236@main> Reviewed commits have been landed. Closing PR #5974 and removing active labels.