[webkit-changes] [WebKit/WebKit] 7a82d3: [WK2] Audio playing from closed tab (facebook.com)

Jer Noble noreply at github.com
Sun Apr 30 18:34:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7a82d30fc628c316d55262d810c6e1becca57529
      https://github.com/WebKit/WebKit/commit/7a82d30fc628c316d55262d810c6e1becca57529
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2023-04-30 (Sun, 30 Apr 2023)

  Changed paths:
    M Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp
    M Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp

  Log Message:
  -----------
  [WK2] Audio playing from closed tab (facebook.com)
https://bugs.webkit.org/show_bug.cgi?id=256152
rdar://106866813

Reviewed by Eric Carlson and Andy Estes.

The GPUConnectionToWebProcess's m_remoteMediaPlayerManagerProxy object is only
destroyed/cleared when the GPUConnectionToWebProcess itself is destroyed. This
may not happen for various reasons (reusing the connection, etc.) when the page
itself is closed. Rather than rely on the connection's destruction to clear
the object keeping playback alive, clear the RemoteMediaPlayerManagerProxy when
the connection receives the DidClose message, like many other objects owned by
the connection.

The RemoteMediaplayerManagerProxy had a pre-existing `clear()` method declared
but not implemented. Move the code from the destructor into a newly implemented
`clear()` method, and call it from the destructor.

* Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::didClose):
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:
(WebKit::RemoteMediaPlayerManagerProxy::~RemoteMediaPlayerManagerProxy):
(WebKit::RemoteMediaPlayerManagerProxy::clear):

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




More information about the webkit-changes mailing list