LibWeb: Validate AudioParam context in AudioNode::connect()

An exception is now thown if an `AudioNode` attempts to connect to an
`AudioParam` from a different `BaseAudioContext`.
This commit is contained in:
Tim Ledbetter 2025-01-08 20:04:28 +00:00 committed by Tim Ledbetter
commit 5c57acf140
Notes: github-actions[bot] 2025-01-09 11:35:50 +00:00
14 changed files with 54 additions and 43 deletions

View file

@ -29,7 +29,7 @@ namespace Web::WebAudio {
BaseAudioContext::BaseAudioContext(JS::Realm& realm, float sample_rate)
: DOM::EventTarget(realm)
, m_sample_rate(sample_rate)
, m_listener(AudioListener::create(realm))
, m_listener(AudioListener::create(realm, *this))
{
}