Bug 1811320 [wpt PR 38067] - Reject pending setSinkId requests with valid ExceptionCo...
commit3aa6cdf838923d7e98f4edb3906fd573583e40ed
authorAlvin Ji <alvinji@chromium.org>
Fri, 27 Jan 2023 14:07:49 +0000 (27 14:07 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Wed, 1 Feb 2023 13:59:00 +0000 (1 13:59 +0000)
tree9b0dbbc3d7a74f0f1d2afff4de5f847ea52478d5
parenta693bdfb8d5d0abf22c166c00e776042a4f16837
Bug 1811320 [wpt PR 38067] - Reject pending setSinkId requests with valid ExceptionContext, a=testonly

Automatic update from web-platform-tests
Reject pending setSinkId requests with valid ExceptionContext

Rejecting pending setSinkId requests is a step of
`AudioContext::closeContext`. Because it is rejecting pending setSinkId
from a different Promise entry call, it doesn't have a valid
ExceptionContext which lead a crash.  This CL fixes it by creating a
fresh DOMException and attach it to the being rejected pending request
also add a test to guard this case.

Bug: 1408376
Change-Id: Ie3090c1b631ad3ec1132a5e2fba0f047fd01d3e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4179633
Commit-Queue: Alvin Ji <alvinji@chromium.org>
Reviewed-by: Michael Wilson <mjwilson@chromium.org>
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1094689}

--

wpt-commits: 8282459e49cd39b819f9d7ab3d0b523807f736ac
wpt-pr: 38067
testing/web-platform/tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-sinkid-setsinkid.https.html