WebKit Bugzilla
Attachment 371503 Details for
Bug 198612
: REGRESSION(244439): platform/mac/media/encrypted-media/fps-* tests are crashing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198612-20190606093717.patch (text/plain), 9.42 KB, created by
Jer Noble
on 2019-06-06 09:37:17 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2019-06-06 09:37:17 PDT
Size:
9.42 KB
patch
obsolete
>Subversion Revision: 246122 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index d791f470d402c4450552289d5e33530d58645c73..aac81eeebf45a1aa725730639291f8e6768ab5d6 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,29 @@ >+2019-06-06 Jer Noble <jer.noble@apple.com> >+ >+ REGRESSION(244439): platform/mac/media/encrypted-media/fps-* tests are crashing >+ https://bugs.webkit.org/show_bug.cgi?id=198612 >+ <rdar://problem/51078978> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ There are two implementations of a 'cenc' initialiation data factory; an ASSERT fires when >+ the second one is added to the registry. Unify them. >+ >+ * Modules/encryptedmedia/InitDataRegistry.cpp: >+ (WebCore::extractKeyIDsCenc): >+ * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp: >+ (WebCore::CDMPrivateFairPlayStreaming::validFairPlayStreamingSchemes): >+ (WebCore::CDMPrivateFairPlayStreaming::fairPlaySystemID): >+ (WebCore::validInitDataTypes): >+ (WebCore::CDMFactory::platformRegisterFactories): >+ (WebCore::validFairPlayStreamingSchemes): Deleted. >+ (WebCore::CDMPrivateFairPlayStreaming::cencName): Deleted. >+ (WebCore::fairPlaySystemID): Deleted. >+ (WebCore::extractSchemeAndKeyIdFromCenc): Deleted. >+ (WebCore::CDMPrivateFairPlayStreaming::extractKeyIDsCenc): Deleted. >+ (WebCore::CDMPrivateFairPlayStreaming::sanitizeCenc): Deleted. >+ * platform/graphics/avfoundation/CDMFairPlayStreaming.h: >+ > 2019-06-05 Antoine Quint <graouts@apple.com> > > [Pointer Events] Fire pointerout and pointerleave events after firing pointercancel >diff --git a/Source/WebCore/Modules/encryptedmedia/InitDataRegistry.cpp b/Source/WebCore/Modules/encryptedmedia/InitDataRegistry.cpp >index 9f8b5e0551b65870da590793b25f991842a346cb..7224a0d468e727f291882dec186093919b192f6d 100644 >--- a/Source/WebCore/Modules/encryptedmedia/InitDataRegistry.cpp >+++ b/Source/WebCore/Modules/encryptedmedia/InitDataRegistry.cpp >@@ -28,6 +28,8 @@ > > #if ENABLE(ENCRYPTED_MEDIA) > >+#include "CDMFairPlayStreaming.h" >+#include "ISOFairPlayStreamingPsshBox.h" > #include "ISOProtectionSystemSpecificHeaderBox.h" > #include <JavaScriptCore/DataView.h> > #include "NotImplemented.h" >@@ -129,6 +131,23 @@ static Optional<Vector<Ref<SharedBuffer>>> extractKeyIDsCenc(const SharedBuffer& > if (!psshBox.read(view, offset)) > return WTF::nullopt; > >+#if HAVE(FAIRPLAYSTREAMING_CENC_INITDATA) >+ if (psshBox.systemID() != CDMPrivateFairPlayStreaming::fairPlaySystemID()) { >+ ISOFairPlayStreamingPsshBox fpsPssh; >+ offset -= psshBox.size(); >+ if (!fpsPssh.read(view, offset)) >+ return WTF::nullopt; >+ >+ FourCC scheme = fpsPssh.initDataBox().info().scheme(); >+ if (CDMPrivateFairPlayStreaming::validFairPlayStreamingSchemes().contains(scheme)) { >+ for (auto request : fpsPssh.initDataBox().requests()) { >+ auto& keyID = request.requestInfo().keyID(); >+ keyIDs.append(SharedBuffer::create(keyID.data(), keyID.size())); >+ } >+ } >+ } >+#endif >+ > for (auto& value : psshBox.keyIDs()) > keyIDs.append(SharedBuffer::create(WTFMove(value))); > } >diff --git a/Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.cpp b/Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.cpp >index 0b4df5886cf9d6e103d98c249ddc7a77ece3dc34..1b8535480e4228b6155a155eff826145e1c2320c 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.cpp >+++ b/Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.cpp >@@ -32,7 +32,6 @@ > #include "CDMKeySystemConfiguration.h" > #include "CDMRestrictions.h" > #include "CDMSessionType.h" >-#include "ISOFairPlayStreamingPsshBox.h" > #include "ISOSchemeInformationBox.h" > #include "ISOSchemeTypeBox.h" > #include "ISOTrackEncryptionBox.h" >@@ -51,9 +50,9 @@ > > namespace WebCore { > >-static const Vector<FourCC>& validFairPlayStreamingSchemes() >+const Vector<FourCC>& CDMPrivateFairPlayStreaming::validFairPlayStreamingSchemes() > { >- static NeverDestroyed<Vector<FourCC>> validSchemes = Vector<FourCC>({ >+ static NeverDestroyed<Vector<FourCC>> validSchemes = Vector<FourCC>({ > "cbcs", > "cbc2", > "cbc1", >@@ -75,13 +74,7 @@ const AtomicString& CDMPrivateFairPlayStreaming::skdName() > return skd; > } > >-const AtomicString& CDMPrivateFairPlayStreaming::cencName() >-{ >- static NeverDestroyed<AtomicString> cenc { MAKE_STATIC_STRING_IMPL("cenc") }; >- return cenc; >-} >- >-static const Vector<uint8_t>& fairPlaySystemID() >+const Vector<uint8_t>& CDMPrivateFairPlayStreaming::fairPlaySystemID() > { > static NeverDestroyed<Vector<uint8_t>> systemID = Vector<uint8_t>({ 0x94, 0xCE, 0x86, 0xFB, 0x07, 0xFF, 0x4F, 0x43, 0xAD, 0xB8, 0x93, 0xD2, 0xFA, 0x96, 0x8C, 0xA2 }); > return systemID; >@@ -184,54 +177,6 @@ Optional<Vector<Ref<SharedBuffer>>> CDMPrivateFairPlayStreaming::extractKeyIDsSi > return keyIDs; > } > >-static SchemeAndKeyResult extractSchemeAndKeyIdFromCenc(const SharedBuffer& buffer) >-{ >- auto arrayBuffer = buffer.tryCreateArrayBuffer(); >- if (!arrayBuffer) >- return { }; >- >- auto view = JSC::DataView::create(WTFMove(arrayBuffer), 0, buffer.size()); >- unsigned offset { 0 }; >- >- SchemeAndKeyResult result; >- while (offset < buffer.size()) { >- auto peekResult = ISOBox::peekBox(view, offset); >- if (!peekResult || peekResult.value().first != ISOProtectionSystemSpecificHeaderBox::boxTypeName()) >- return { }; >- >- ISOProtectionSystemSpecificHeaderBox psshBox; >- if (!psshBox.read(view, offset)) >- return { }; >- >- if (psshBox.systemID() != fairPlaySystemID()) >- continue; >- >- ISOFairPlayStreamingPsshBox fpsPssh; >- offset -= psshBox.size(); >- if (!fpsPssh.read(view, offset)) >- return { }; >- >- FourCC scheme = fpsPssh.initDataBox().info().scheme(); >- for (auto request : fpsPssh.initDataBox().requests()) >- result.append(std::make_pair(scheme, request.requestInfo().keyID())); >- } >- >- return result; >-} >- >-Optional<Vector<Ref<SharedBuffer>>> CDMPrivateFairPlayStreaming::extractKeyIDsCenc(const SharedBuffer& buffer) >-{ >- Vector<Ref<SharedBuffer>> keyIDs; >- auto results = extractSchemeAndKeyIdFromCenc(buffer); >- >- for (auto& result : results) { >- if (validFairPlayStreamingSchemes().contains(result.first)) >- keyIDs.append(SharedBuffer::create(result.second.data(), result.second.size())); >- } >- >- return keyIDs; >-} >- > RefPtr<SharedBuffer> CDMPrivateFairPlayStreaming::sanitizeSinf(const SharedBuffer& buffer) > { > // Common SINF Box Format >@@ -247,13 +192,6 @@ RefPtr<SharedBuffer> CDMPrivateFairPlayStreaming::sanitizeSkd(const SharedBuffer > return buffer.copy(); > } > >-RefPtr<SharedBuffer> CDMPrivateFairPlayStreaming::sanitizeCenc(const SharedBuffer& buffer) >-{ >- UNUSED_PARAM(buffer); >- notImplemented(); >- return buffer.copy(); >-} >- > Optional<Vector<Ref<SharedBuffer>>> CDMPrivateFairPlayStreaming::extractKeyIDsSkd(const SharedBuffer& buffer) > { > // In the 'skd' scheme, the init data is the key ID. >@@ -267,9 +205,6 @@ static const HashSet<AtomicString>& validInitDataTypes() > static NeverDestroyed<HashSet<AtomicString>> validTypes = HashSet<AtomicString>({ > CDMPrivateFairPlayStreaming::sinfName(), > CDMPrivateFairPlayStreaming::skdName(), >-#if HAVE(FAIRPLAYSTREAMING_CENC_INITDATA) >- CDMPrivateFairPlayStreaming::cencName(), >-#endif > }); > return validTypes; > } >@@ -281,9 +216,6 @@ void CDMFactory::platformRegisterFactories(Vector<CDMFactory*>& factories) > > InitDataRegistry::shared().registerInitDataType(CDMPrivateFairPlayStreaming::sinfName(), { CDMPrivateFairPlayStreaming::sanitizeSinf, CDMPrivateFairPlayStreaming::extractKeyIDsSinf }); > InitDataRegistry::shared().registerInitDataType(CDMPrivateFairPlayStreaming::skdName(), { CDMPrivateFairPlayStreaming::sanitizeSkd, CDMPrivateFairPlayStreaming::extractKeyIDsSkd }); >-#if HAVE(FAIRPLAYSTREAMING_CENC_INITDATA) >- InitDataRegistry::shared().registerInitDataType(CDMPrivateFairPlayStreaming::cencName(), { CDMPrivateFairPlayStreaming::sanitizeCenc, CDMPrivateFairPlayStreaming::extractKeyIDsCenc }); >-#endif > } > > CDMFactoryFairPlayStreaming& CDMFactoryFairPlayStreaming::singleton() >diff --git a/Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.h b/Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.h >index cb5aa023b8ec05ecbb48e1ed19c73cdc5d24d75f..9167b6e18b4622fb8a52a04f25e84cba5e6aa715 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.h >+++ b/Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.h >@@ -32,6 +32,8 @@ > > namespace WebCore { > >+struct FourCC; >+ > class CDMFactoryFairPlayStreaming final : public CDMFactory { > public: > static CDMFactoryFairPlayStreaming& singleton(); >@@ -75,9 +77,8 @@ public: > static Optional<Vector<Ref<SharedBuffer>>> extractKeyIDsSkd(const SharedBuffer&); > static RefPtr<SharedBuffer> sanitizeSkd(const SharedBuffer&); > >- static const AtomicString& cencName(); >- static Optional<Vector<Ref<SharedBuffer>>> extractKeyIDsCenc(const SharedBuffer&); >- static RefPtr<SharedBuffer> sanitizeCenc(const SharedBuffer&); >+ static const Vector<FourCC>& validFairPlayStreamingSchemes(); >+ static const Vector<uint8_t>& fairPlaySystemID(); > }; > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198612
:
371503
|
371522
|
372132