tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 0b380e13ca46e9893d019d3e379ad530aa0cf571
parent 7738921acf74eb26c45584294afbe07da0542002
Author: Taym Haddadi <haddadi.taym@gmail.com>
Date:   Wed,  3 Dec 2025 14:42:04 +0000

Bug 2003293 [wpt PR 56368] - Fix crash when creating an AudioNode from a closed AudioContext, a=testonly

Automatic update from web-platform-tests
Fix crash when creating an AudioNode from a closed AudioContext

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

--

wpt-commits: 56a670787b4d0de5b55cc8c89565aa4341718f7c
wpt-pr: 56368

Diffstat:
Atesting/web-platform/tests/webaudio/the-audio-api/the-mediastreamaudiodestinationnode-interface/closed-audiocontext-construction.html | 21+++++++++++++++++++++
1 file changed, 21 insertions(+), 0 deletions(-)

diff --git a/testing/web-platform/tests/webaudio/the-audio-api/the-mediastreamaudiodestinationnode-interface/closed-audiocontext-construction.html b/testing/web-platform/tests/webaudio/the-audio-api/the-mediastreamaudiodestinationnode-interface/closed-audiocontext-construction.html @@ -0,0 +1,21 @@ +<!doctype html> +<title>MediaStreamAudioDestinationNode after closing AudioContext</title> +<meta charset="utf-8"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +promise_test(async t => { + const context = new AudioContext(); + await context.close(); + assert_equals(context.state, "closed", "The AudioContext should report a closed state"); + + let audioNode; + try { + audioNode = new MediaStreamAudioDestinationNode(context); + } catch (err) { + assert_unreached(`Constructing MediaStreamAudioDestinationNode should not throw when the context is closed. Threw: ${err}`); + } + + assert_true(audioNode instanceof MediaStreamAudioDestinationNode, "The created node should be a MediaStreamAudioDestinationNode"); +}, "Constructing MediaStreamAudioDestinationNode on a closed AudioContext succeeds"); +</script>