Re-land <https://commits.webkit.org/257982@main> with an assert fix and crash fix.
<rdar://problem/92608084>
Pull request: https://github.com/WebKit/WebKit/pull/8129
Committed 258431@main (34a36c72aeaa): <https://commits.webkit.org/258431@main> Reviewed commits have been landed. Closing PR #8129 and removing active labels.