Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 18c0dd0e5965d986cb727b6b6f269280eef34767
      
https://github.com/WebKit/WebKit/commit/18c0dd0e5965d986cb727b6b6f269280eef34767
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2026-07-22 (Wed, 22 Jul 2026)

  Changed paths:
    M Source/WebKit/UIProcess/Media/RemoteMediaSessionManagerProxy.cpp
    M Source/WebKit/UIProcess/Media/RemoteMediaSessionManagerProxy.h
    M Source/WebKit/UIProcess/Media/RemoteMediaSessionManagerProxy.messages.in
    M Source/WebKit/WebProcess/Media/RemoteMediaSessionManager.cpp

  Log Message:
  -----------
  [site-isolation] 
platform/mac/media/media-source/media-source-change-source.html is a permanent 
timeout
https://bugs.webkit.org/show_bug.cgi?id=319967
rdar://182891717

Reviewed by Youenn Fablet.

Test hung when run with --site-isolation waiting for
internals.audioSessionCategory() to become "MediaPlayback".

Under Site Isolation, the audio session category is computed by
RemoteMediaSessionManagerProxy in the UI process instead of by WebContent.
Two bugs kept that computation from ever reaching MediaPlayback there:

1. DeprecatedGlobalSettings::shouldManageAudioSessionCategory() is a
per-process flag that gates the whole computation in
MediaSessionManagerCocoa::updateSessionState(). WebContent sets it, but it
wasn't set in the UIProcess

2. Once the gate was fixed, the UI process still computed against stale
session data: RemoteMediaSessionProxy's cached isAudible/isPlaying state
which was only refreshed by four specific messages (AddMediaSession,
RemoveMediaSession, SetCurrentMediaSession, MediaSessionStateChanged), but
the message that actually triggers recomputation, UpdateMediaSessionState,
carried no session data and fires from other call sites that don't push
fresh state first.

Send the flag and a snapshot of every current session on
UpdateMediaSessionState, and have the UI process refresh its cached
session proxies from that snapshot before recomputing category. This
keeps recomputation correct regardless of which code path triggered it,
instead of patching each call site individually.

* Source/WebKit/UIProcess/Media/RemoteMediaSessionManagerProxy.messages.in:
* Source/WebKit/UIProcess/Media/RemoteMediaSessionManagerProxy.h:
* Source/WebKit/UIProcess/Media/RemoteMediaSessionManagerProxy.cpp:
(WebKit::RemoteMediaSessionManagerProxy::refreshSessionStates):
(WebKit::RemoteMediaSessionManagerProxy::updateMediaSessionState):
* Source/WebKit/WebProcess/Media/RemoteMediaSessionManager.cpp:
(WebKit::RemoteMediaSessionManager::updateSessionState):

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



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

Reply via email to