Title: [276571] trunk/Source/WebKit
- Revision
- 276571
- Author
- [email protected]
- Date
- 2021-04-25 13:38:23 -0700 (Sun, 25 Apr 2021)
Log Message
[GPUP] REGRESSION: Selecting play/pause on Spotify.com causes page to reload
https://bugs.webkit.org/show_bug.cgi?id=225023
<rdar://76985997>
Reviewed by Darin Adler.
A zero ObjectIdentifier is apparently invalid, which causes a debug ASSERT on the sending
side and a SIGKILL on the receiving side. Replace the zero ObjectIdentifier message when
clearing a LegacyCDMSession with an Optional<ObjectIdentifier>, and send an explicit
WTF::nullopt when clearing.
* GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::mediaPlayerCachedKeyForKeyId const):
(WebKit::RemoteMediaPlayerProxy::setLegacyCDMSession):
* GPUProcess/media/RemoteMediaPlayerProxy.h:
* GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::setCDMSession):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (276570 => 276571)
--- trunk/Source/WebKit/ChangeLog 2021-04-25 20:32:24 UTC (rev 276570)
+++ trunk/Source/WebKit/ChangeLog 2021-04-25 20:38:23 UTC (rev 276571)
@@ -1,5 +1,26 @@
2021-04-25 Jer Noble <[email protected]>
+ [GPUP] REGRESSION: Selecting play/pause on Spotify.com causes page to reload
+ https://bugs.webkit.org/show_bug.cgi?id=225023
+ <rdar://76985997>
+
+ Reviewed by Darin Adler.
+
+ A zero ObjectIdentifier is apparently invalid, which causes a debug ASSERT on the sending
+ side and a SIGKILL on the receiving side. Replace the zero ObjectIdentifier message when
+ clearing a LegacyCDMSession with an Optional<ObjectIdentifier>, and send an explicit
+ WTF::nullopt when clearing.
+
+ * GPUProcess/media/RemoteMediaPlayerProxy.cpp:
+ (WebKit::RemoteMediaPlayerProxy::mediaPlayerCachedKeyForKeyId const):
+ (WebKit::RemoteMediaPlayerProxy::setLegacyCDMSession):
+ * GPUProcess/media/RemoteMediaPlayerProxy.h:
+ * GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
+ * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
+ (WebKit::MediaPlayerPrivateRemote::setCDMSession):
+
+2021-04-25 Jer Noble <[email protected]>
+
[GPUP][iOS] Silent video playback can interrupt system audio
https://bugs.webkit.org/show_bug.cgi?id=225031
<rdar://76652073>
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp (276570 => 276571)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp 2021-04-25 20:32:24 UTC (rev 276570)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp 2021-04-25 20:38:23 UTC (rev 276571)
@@ -652,7 +652,7 @@
if (!m_legacySession)
return nullptr;
- if (auto cdmSession = m_manager->gpuConnectionToWebProcess()->legacyCdmFactoryProxy().getSession(m_legacySession))
+ if (auto cdmSession = m_manager->gpuConnectionToWebProcess()->legacyCdmFactoryProxy().getSession(*m_legacySession))
return cdmSession->getCachedKeyForKeyId(keyId);
return nullptr;
}
@@ -847,7 +847,7 @@
}
#if ENABLE(LEGACY_ENCRYPTED_MEDIA)
-void RemoteMediaPlayerProxy::setLegacyCDMSession(RemoteLegacyCDMSessionIdentifier&& instanceId)
+void RemoteMediaPlayerProxy::setLegacyCDMSession(Optional<RemoteLegacyCDMSessionIdentifier>&& instanceId)
{
ASSERT(m_manager && m_manager->gpuConnectionToWebProcess());
if (!m_manager || !m_manager->gpuConnectionToWebProcess())
@@ -857,7 +857,7 @@
return;
if (m_legacySession) {
- if (auto cdmSession = m_manager->gpuConnectionToWebProcess()->legacyCdmFactoryProxy().getSession(m_legacySession)) {
+ if (auto cdmSession = m_manager->gpuConnectionToWebProcess()->legacyCdmFactoryProxy().getSession(*m_legacySession)) {
m_player->setCDMSession(nullptr);
cdmSession->setPlayer(nullptr);
}
@@ -866,7 +866,7 @@
m_legacySession = instanceId;
if (m_legacySession) {
- if (auto cdmSession = m_manager->gpuConnectionToWebProcess()->legacyCdmFactoryProxy().getSession(m_legacySession)) {
+ if (auto cdmSession = m_manager->gpuConnectionToWebProcess()->legacyCdmFactoryProxy().getSession(*m_legacySession)) {
m_player->setCDMSession(cdmSession->session());
cdmSession->setPlayer(makeWeakPtr(this));
}
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h (276570 => 276571)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h 2021-04-25 20:32:24 UTC (rev 276570)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h 2021-04-25 20:38:23 UTC (rev 276571)
@@ -157,7 +157,7 @@
#endif
#if ENABLE(LEGACY_ENCRYPTED_MEDIA)
- void setLegacyCDMSession(RemoteLegacyCDMSessionIdentifier&& instanceId);
+ void setLegacyCDMSession(Optional<RemoteLegacyCDMSessionIdentifier>&& instanceId);
void keyAdded();
#endif
@@ -329,7 +329,7 @@
#if ENABLE(LEGACY_ENCRYPTED_MEDIA) && ENABLE(ENCRYPTED_MEDIA)
bool m_shouldContinueAfterKeyNeeded { false };
- RemoteLegacyCDMSessionIdentifier m_legacySession;
+ Optional<RemoteLegacyCDMSessionIdentifier> m_legacySession;
#endif
#if ENABLE(WEB_AUDIO) && PLATFORM(COCOA)
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in (276570 => 276571)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in 2021-04-25 20:32:24 UTC (rev 276570)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in 2021-04-25 20:38:23 UTC (rev 276571)
@@ -76,7 +76,7 @@
#endif
#if ENABLE(LEGACY_ENCRYPTED_MEDIA)
- SetLegacyCDMSession(WebKit::RemoteLegacyCDMSessionIdentifier instanceId)
+ SetLegacyCDMSession(Optional<WebKit::RemoteLegacyCDMSessionIdentifier> instanceId)
KeyAdded()
#endif
Modified: trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp (276570 => 276571)
--- trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp 2021-04-25 20:32:24 UTC (rev 276570)
+++ trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp 2021-04-25 20:38:23 UTC (rev 276571)
@@ -1056,7 +1056,7 @@
void MediaPlayerPrivateRemote::setCDMSession(LegacyCDMSession* session)
{
if (!session || session->type() != CDMSessionTypeRemote) {
- connection().send(Messages::RemoteMediaPlayerProxy::SetLegacyCDMSession({ }), m_id);
+ connection().send(Messages::RemoteMediaPlayerProxy::SetLegacyCDMSession(WTF::nullopt), m_id);
return;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes