Changeset 254288 in webkit
- Timestamp:
- Jan 9, 2020, 12:18:40 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h (modified) (2 diffs)
-
platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r254281 r254288 1 2020-01-09 Jer Noble <jer.noble@apple.com> 2 3 [Cocoa] persistent-usage-record message fails first time; succeeds subsequent times 4 https://bugs.webkit.org/show_bug.cgi?id=205970 5 <rdar://problem/57785647> 6 7 Reviewed by Eric Carlson. 8 9 The AVContentKeySession is created too early; before the CDM has a chance to provide the storage path 10 for persistent usage records. Delay creation of the AVCKS until it's actually needed during the first 11 license request. 12 13 Drive-by fix: fix the exceptional case where a PUR session is closed but PUR data isn't available; send 14 a null message rather than an empty array. 15 16 * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h: 17 * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: 18 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::contentKeySession): 19 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData): 20 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::CDMInstanceFairPlayStreamingAVFObjC): Deleted. 21 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::ensureSession): Deleted. 22 1 23 2020-01-09 Zalan Bujtas <zalan@apple.com> 2 24 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h
r253064 r254288 88 88 bool persistentStateAllowed() const { return m_persistentStateAllowed; } 89 89 SharedBuffer* serverCertificate() const { return m_serverCertificate.get(); } 90 AVContentKeySession* contentKeySession() { return m_session.get(); }90 AVContentKeySession* contentKeySession(); 91 91 92 92 // AVContentKeySessionDelegateClient … … 107 107 108 108 private: 109 void ensureSession();110 111 109 RetainPtr<AVContentKeySession> m_session; 112 110 RetainPtr<WebCoreFPSContentKeySessionDelegate> m_delegate; -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm
r253852 r254288 160 160 namespace WebCore { 161 161 162 CDMInstanceFairPlayStreamingAVFObjC::CDMInstanceFairPlayStreamingAVFObjC() 163 { 164 if (PAL::getAVContentKeyReportGroupClass()) 165 ensureSession(); 166 } 167 168 void CDMInstanceFairPlayStreamingAVFObjC::ensureSession() 162 CDMInstanceFairPlayStreamingAVFObjC::CDMInstanceFairPlayStreamingAVFObjC() = default; 163 164 AVContentKeySession* CDMInstanceFairPlayStreamingAVFObjC::contentKeySession() 169 165 { 170 166 if (m_session) 171 return ;167 return m_session.get(); 172 168 173 169 if (!PAL::canLoad_AVFoundation_AVContentKeySystemFairPlayStreaming()) 174 return; 170 return nullptr; 171 172 if (!PAL::getAVContentKeyReportGroupClass()) 173 return nullptr; 175 174 176 175 auto storageURL = this->storageURL(); … … 181 180 182 181 if (!m_session) 183 return ;182 return nullptr; 184 183 185 184 if (!m_delegate) … … 187 186 188 187 [m_session setDelegate:m_delegate.get() queue:dispatch_get_main_queue()]; 188 return m_session.get(); 189 189 } 190 190 … … 817 817 } 818 818 819 if (!expiredSessionsArray.get().count) { 820 callback(WTFMove(changedKeys), WTF::nullopt, Succeeded); 821 return; 822 } 823 819 824 RetainPtr<NSData> expiredSessionsData = [NSPropertyListSerialization dataWithPropertyList:expiredSessionsArray.get() format:NSPropertyListBinaryFormat_v1_0 options:kCFPropertyListImmutable error:nullptr]; 820 825
Note:
See TracChangeset
for help on using the changeset viewer.