Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 995043a1cea994b964c1a8e670ba9ed2d3274325
      
https://github.com/WebKit/WebKit/commit/995043a1cea994b964c1a8e670ba9ed2d3274325
  Author: Dana Estra <[email protected]>
  Date:   2026-01-28 (Wed, 28 Jan 2026)

  Changed paths:
    M Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlayingSession.mm

  Log Message:
  -----------
  Control Center shows YouTube video after navigating away from YouTube
https://bugs.webkit.org/show_bug.cgi?id=306376
rdar://155225435

Reviewed by Brady Eidson.

Currently, the GPU process relies on an explicit message from
the web content process to clear the now playing info. However,
there are a variety of ways a web process can exit, and not
all of them require being cleanly torn down, in which case
NowPlayingManager::clearNowPlayingInfo() might not be
called.

In this particular case, when a tab playing a video on youtube.com
is closed, youtube's service worker prevents us from cleanly tearing
down the web process, and clearNowPlayingInfo() is not called.

This fix makes it so when the GPU process knows that the web process is
about to close, it clears the now playing info on its own. This hardens it
against all ways the web process might close.

Added API test NowPlayingSession.KillWebContentProcessAfterHasSession

* Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::didClose):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlayingSession.mm:
(TEST(NowPlayingSession, KillWebContentProcessAfterHasSession)):

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



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

Reply via email to