summaryrefslogtreecommitdiffstats
path: root/dom/media/eme/MediaEncryptedEvent.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-06-03 10:50:44 +0000
committerMoonchild <moonchild@palemoon.org>2020-06-03 10:50:44 +0000
commit5e5f2277f5e6700325618adae685c55716f325c7 (patch)
treef2cf502f4b9404f823520ea870180e64babb3751 /dom/media/eme/MediaEncryptedEvent.cpp
parent744b044935f7d1d67fbe0df42d898efcbdd00536 (diff)
parent265d1b80197afa05aa9099b49d625958177752df (diff)
downloadUXP-5e5f2277f5e6700325618adae685c55716f325c7.tar
UXP-5e5f2277f5e6700325618adae685c55716f325c7.tar.gz
UXP-5e5f2277f5e6700325618adae685c55716f325c7.tar.lz
UXP-5e5f2277f5e6700325618adae685c55716f325c7.tar.xz
UXP-5e5f2277f5e6700325618adae685c55716f325c7.zip
Merge branch 'redwood' into release
Diffstat (limited to 'dom/media/eme/MediaEncryptedEvent.cpp')
-rw-r--r--dom/media/eme/MediaEncryptedEvent.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/dom/media/eme/MediaEncryptedEvent.cpp b/dom/media/eme/MediaEncryptedEvent.cpp
index 8e2595fcb..fe1c8a3bc 100644
--- a/dom/media/eme/MediaEncryptedEvent.cpp
+++ b/dom/media/eme/MediaEncryptedEvent.cpp
@@ -87,10 +87,10 @@ MediaEncryptedEvent::Constructor(const GlobalObject& aGlobal,
e->mInitDataType = aEventInitDict.mInitDataType;
if (!aEventInitDict.mInitData.IsNull()) {
const auto& a = aEventInitDict.mInitData.Value();
- a.ComputeLengthAndData();
- e->mInitData = ArrayBuffer::Create(aGlobal.Context(),
- a.Length(),
- a.Data());
+ nsTArray<uint8_t> initData;
+ CopyArrayBufferViewOrArrayBufferData(a, initData);
+ e->mInitData = ArrayBuffer::Create(aGlobal.Context(), initData.Length(),
+ initData.Elements());
if (!e->mInitData) {
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
return nullptr;