Changeset 276571 in webkit
- Timestamp:
- Apr 25, 2021, 1:38:23 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
GPUProcess/media/RemoteMediaPlayerProxy.cpp (modified) (4 diffs)
-
GPUProcess/media/RemoteMediaPlayerProxy.h (modified) (2 diffs)
-
GPUProcess/media/RemoteMediaPlayerProxy.messages.in (modified) (1 diff)
-
WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r276570 r276571 1 2021-04-25 Jer Noble <jer.noble@apple.com> 2 3 [GPUP] REGRESSION: Selecting play/pause on Spotify.com causes page to reload 4 https://bugs.webkit.org/show_bug.cgi?id=225023 5 <rdar://76985997> 6 7 Reviewed by Darin Adler. 8 9 A zero ObjectIdentifier is apparently invalid, which causes a debug ASSERT on the sending 10 side and a SIGKILL on the receiving side. Replace the zero ObjectIdentifier message when 11 clearing a LegacyCDMSession with an Optional<ObjectIdentifier>, and send an explicit 12 WTF::nullopt when clearing. 13 14 * GPUProcess/media/RemoteMediaPlayerProxy.cpp: 15 (WebKit::RemoteMediaPlayerProxy::mediaPlayerCachedKeyForKeyId const): 16 (WebKit::RemoteMediaPlayerProxy::setLegacyCDMSession): 17 * GPUProcess/media/RemoteMediaPlayerProxy.h: 18 * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: 19 * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: 20 (WebKit::MediaPlayerPrivateRemote::setCDMSession): 21 1 22 2021-04-25 Jer Noble <jer.noble@apple.com> 2 23 -
trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp
r276177 r276571 653 653 return nullptr; 654 654 655 if (auto cdmSession = m_manager->gpuConnectionToWebProcess()->legacyCdmFactoryProxy().getSession( m_legacySession))655 if (auto cdmSession = m_manager->gpuConnectionToWebProcess()->legacyCdmFactoryProxy().getSession(*m_legacySession)) 656 656 return cdmSession->getCachedKeyForKeyId(keyId); 657 657 return nullptr; … … 848 848 849 849 #if ENABLE(LEGACY_ENCRYPTED_MEDIA) 850 void RemoteMediaPlayerProxy::setLegacyCDMSession( RemoteLegacyCDMSessionIdentifier&& instanceId)850 void RemoteMediaPlayerProxy::setLegacyCDMSession(Optional<RemoteLegacyCDMSessionIdentifier>&& instanceId) 851 851 { 852 852 ASSERT(m_manager && m_manager->gpuConnectionToWebProcess()); … … 858 858 859 859 if (m_legacySession) { 860 if (auto cdmSession = m_manager->gpuConnectionToWebProcess()->legacyCdmFactoryProxy().getSession( m_legacySession)) {860 if (auto cdmSession = m_manager->gpuConnectionToWebProcess()->legacyCdmFactoryProxy().getSession(*m_legacySession)) { 861 861 m_player->setCDMSession(nullptr); 862 862 cdmSession->setPlayer(nullptr); … … 867 867 868 868 if (m_legacySession) { 869 if (auto cdmSession = m_manager->gpuConnectionToWebProcess()->legacyCdmFactoryProxy().getSession( m_legacySession)) {869 if (auto cdmSession = m_manager->gpuConnectionToWebProcess()->legacyCdmFactoryProxy().getSession(*m_legacySession)) { 870 870 m_player->setCDMSession(cdmSession->session()); 871 871 cdmSession->setPlayer(makeWeakPtr(this)); -
trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h
r276177 r276571 158 158 159 159 #if ENABLE(LEGACY_ENCRYPTED_MEDIA) 160 void setLegacyCDMSession( RemoteLegacyCDMSessionIdentifier&& instanceId);160 void setLegacyCDMSession(Optional<RemoteLegacyCDMSessionIdentifier>&& instanceId); 161 161 void keyAdded(); 162 162 #endif … … 330 330 #if ENABLE(LEGACY_ENCRYPTED_MEDIA) && ENABLE(ENCRYPTED_MEDIA) 331 331 bool m_shouldContinueAfterKeyNeeded { false }; 332 RemoteLegacyCDMSessionIdentifierm_legacySession;332 Optional<RemoteLegacyCDMSessionIdentifier> m_legacySession; 333 333 #endif 334 334 -
trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in
r275530 r276571 77 77 78 78 #if ENABLE(LEGACY_ENCRYPTED_MEDIA) 79 SetLegacyCDMSession( WebKit::RemoteLegacyCDMSessionIdentifierinstanceId)79 SetLegacyCDMSession(Optional<WebKit::RemoteLegacyCDMSessionIdentifier> instanceId) 80 80 KeyAdded() 81 81 #endif -
trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
r276411 r276571 1057 1057 { 1058 1058 if (!session || session->type() != CDMSessionTypeRemote) { 1059 connection().send(Messages::RemoteMediaPlayerProxy::SetLegacyCDMSession( { }), m_id);1059 connection().send(Messages::RemoteMediaPlayerProxy::SetLegacyCDMSession(WTF::nullopt), m_id); 1060 1060 return; 1061 1061 }
Note:
See TracChangeset
for help on using the changeset viewer.