Changeset 259858 in webkit
- Timestamp:
- Apr 10, 2020, 3:32:59 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
platform/encryptedmedia/CDMProxy.cpp (modified) (1 diff)
-
platform/encryptedmedia/CDMProxy.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r259854 r259858 1 2020-04-10 Charlie Turner <cturner@igalia.com> 2 3 [EME][GStreamer] Relax proxy initialization assert 4 https://bugs.webkit.org/show_bug.cgi?id=210258 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 update() may be called on a session before its parent MediaKeys object 9 has been associated with a media element. Supporting this is officially 10 optional, but enough sites (including the W3C EME tests) depend on this 11 optional behaviour that we should support it. 12 13 Covered by imported/w3c/web-platform-tests/encrypted-media. 14 15 * platform/encryptedmedia/CDMProxy.cpp: 16 (WebCore::CDMInstanceProxy::mergeKeysFrom): Since the background 17 proxy may not be installed yet, don't ASSERT() it exists. 18 * platform/encryptedmedia/CDMProxy.h: 19 (WebCore::KeyStore::hasKeys const): 20 (WebCore::CDMInstanceProxy::setProxy): Now, when the background 21 proxy is installed, check if any keys have been made available as 22 described above, and if so, set them. 23 1 24 2020-04-10 Adrian Perez de Castro <aperez@igalia.com> 2 25 -
trunk/Source/WebCore/platform/encryptedmedia/CDMProxy.cpp
r256429 r259858 288 288 ASSERT(isMainThread()); 289 289 m_keyStore.merge(keyStore); 290 LOG(EME, "EME - CDMInstanceProxy - merging keys into proxy instance and notifying CDMProxy of changes"); 291 ASSERT(m_cdmProxy); 292 m_cdmProxy->updateKeyStore(keyStore); 290 if (m_cdmProxy) { 291 LOG(EME, "EME - CDMInstanceProxy - merging keys into proxy instance and notifying CDMProxy of changes"); 292 m_cdmProxy->updateKeyStore(keyStore); 293 } 293 294 } 294 295 -
trunk/Source/WebCore/platform/encryptedmedia/CDMProxy.h
r256429 r259858 89 89 bool add(RefPtr<Key>&&); 90 90 bool remove(const RefPtr<Key>&); 91 bool hasKeys() const { return m_keys.size(); } 91 92 unsigned numKeys() const { return m_keys.size(); } 92 93 const Vector<uint8_t>& keyValue(const Vector<uint8_t>& keyID) const; … … 152 153 m_cdmProxy = WTFMove(proxy); 153 154 m_cdmProxy->setInstance(this); 155 // The CDM instance may be attached after an update(). Not 156 // recommended, but apps and the W3C test-suite do this. 157 if (m_keyStore.hasKeys()) 158 m_cdmProxy->updateKeyStore(m_keyStore); 154 159 } 155 160 void mergeKeysFrom(const KeyStore&);
Note:
See TracChangeset
for help on using the changeset viewer.