The promise can be nullptr if called from the legacy fullscreen API (see DocumentFullscreen::webkitExitFullScreen), so we should check it's existence before trying to resolve.
<rdar://problem/103215492>
Pull request: https://github.com/WebKit/WebKit/pull/7443
Committed 257689@main (91d9d701a8cd): <https://commits.webkit.org/257689@main> Reviewed commits have been landed. Closing PR #7443 and removing active labels.