Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9f60bad504c7d2484e156301d360042fc318dc1a
      
https://github.com/WebKit/WebKit/commit/9f60bad504c7d2484e156301d360042fc318dc1a
  Author: Eric Carlson <[email protected]>
  Date:   2026-07-30 (Thu, 30 Jul 2026)

  Changed paths:
    A 
LayoutTests/platform/mac/media/webaudio-session-removed-when-frame-is-destroyed-expected.txt
    A 
LayoutTests/platform/mac/media/webaudio-session-removed-when-frame-is-destroyed.html
    M Source/WebCore/Modules/webaudio/AudioContext.cpp

  Log Message:
  -----------
  [WebAudio] AudioContext leaves its media session registered after frame 
teardown
https://bugs.webkit.org/show_bug.cgi?id=320689
rdar://183672900

Reviewed by Jean-Yves Avenard.

AudioContext::stop() (document/frame teardown) stopped the audio thread but 
never removed the
context's PlatformMediaSession -- unlike close(), it left the session 
registered with the manager
until the context was garbage-collected, keeping the audio session (and 
NowPlaying) alive on behalf
of a context whose frame was already gone.

Remove the media session in stop(), mirroring close(). setActive(false) is a 
no-op if the context
never activated.

Test: platform/mac/media/webaudio-session-removed-when-frame-is-destroyed.html

* 
LayoutTests/platform/mac/media/webaudio-session-removed-when-frame-is-destroyed-expected.txt:
 Added.
* 
LayoutTests/platform/mac/media/webaudio-session-removed-when-frame-is-destroyed.html:
 Added.
* Source/WebCore/Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::stop):

Canonical link: https://commits.webkit.org/318283@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to