Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 395cd1b2edcfaa8546d61e19fe4b8d1bae7999e2
https://github.com/WebKit/WebKit/commit/395cd1b2edcfaa8546d61e19fe4b8d1bae7999e2
Author: Chris Dumez <[email protected]>
Date: 2026-08-03 (Mon, 03 Aug 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-state-change-after-close.http.window-expected.txt
M LayoutTests/webaudio/construct-node-with-closed-context-expected.txt
M Source/WebCore/Modules/webaudio/AudioContext.cpp
Log Message:
-----------
AudioContext.close() should reject when called on an already-closed context
https://bugs.webkit.org/show_bug.cgi?id=320872
Reviewed by Darin Adler.
Calling close() on an AudioContext that is already in the "closed" state
resolved the returned promise instead of rejecting it. Per the Web Audio
spec, close() must reject with an InvalidStateError in this case, matching
the behavior of suspend() and resume() (which were already correct). Both
Blink and Gecko reject as expected.
Merge the already-closed check into the existing stopped check so that
close() rejects with an InvalidStateError, consistent with
suspendRendering() and resumeRendering().
*
LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-state-change-after-close.http.window-expected.txt:
* Source/WebCore/Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::close):
Canonical link: https://commits.webkit.org/318522@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications