Changeset 254608 in webkit
- Timestamp:
- Jan 15, 2020, 11:15:37 AM (7 years ago)
- Location:
- branches/safari-609-branch/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
-
branches/safari-609-branch/Source/WebCore/ChangeLog
r254601 r254608 1 2020-01-14 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r254288. rdar://problem/58548984 4 5 [Cocoa] persistent-usage-record message fails first time; succeeds subsequent times 6 https://bugs.webkit.org/show_bug.cgi?id=205970 7 <rdar://problem/57785647> 8 9 Reviewed by Eric Carlson. 10 11 The AVContentKeySession is created too early; before the CDM has a chance to provide the storage path 12 for persistent usage records. Delay creation of the AVCKS until it's actually needed during the first 13 license request. 14 15 Drive-by fix: fix the exceptional case where a PUR session is closed but PUR data isn't available; send 16 a null message rather than an empty array. 17 18 * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h: 19 * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: 20 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::contentKeySession): 21 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData): 22 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::CDMInstanceFairPlayStreamingAVFObjC): Deleted. 23 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::ensureSession): Deleted. 24 25 26 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254288 268f45cc-cd09-0410-ab3c-d52691b4dbfc 27 28 2020-01-09 Jer Noble <jer.noble@apple.com> 29 30 [Cocoa] persistent-usage-record message fails first time; succeeds subsequent times 31 https://bugs.webkit.org/show_bug.cgi?id=205970 32 <rdar://problem/57785647> 33 34 Reviewed by Eric Carlson. 35 36 The AVContentKeySession is created too early; before the CDM has a chance to provide the storage path 37 for persistent usage records. Delay creation of the AVCKS until it's actually needed during the first 38 license request. 39 40 Drive-by fix: fix the exceptional case where a PUR session is closed but PUR data isn't available; send 41 a null message rather than an empty array. 42 43 * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h: 44 * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: 45 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::contentKeySession): 46 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData): 47 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::CDMInstanceFairPlayStreamingAVFObjC): Deleted. 48 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::ensureSession): Deleted. 49 1 50 2020-01-14 Alan Coon <alancoon@apple.com> 2 51 -
branches/safari-609-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h
r253064 r254608 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; -
branches/safari-609-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm
r253852 r254608 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.