summaryrefslogtreecommitdiffstats
path: root/dom/media/eme/MediaKeyMessageEvent.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/MediaKeyMessageEvent.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/MediaKeyMessageEvent.cpp')
-rw-r--r--dom/media/eme/MediaKeyMessageEvent.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/dom/media/eme/MediaKeyMessageEvent.cpp b/dom/media/eme/MediaKeyMessageEvent.cpp
index 37c509e67..289d0c16e 100644
--- a/dom/media/eme/MediaKeyMessageEvent.cpp
+++ b/dom/media/eme/MediaKeyMessageEvent.cpp
@@ -85,10 +85,11 @@ MediaKeyMessageEvent::Constructor(const GlobalObject& aGlobal,
RefPtr<MediaKeyMessageEvent> e = new MediaKeyMessageEvent(owner);
bool trusted = e->Init(owner);
e->InitEvent(aType, aEventInitDict.mBubbles, aEventInitDict.mCancelable);
- aEventInitDict.mMessage.ComputeLengthAndData();
+ nsTArray<uint8_t> initData;
+ CopyArrayBufferViewOrArrayBufferData(aEventInitDict.mMessage, initData);
e->mMessage = ArrayBuffer::Create(aGlobal.Context(),
- aEventInitDict.mMessage.Length(),
- aEventInitDict.mMessage.Data());
+ initData.Length(),
+ initData.Elements());
if (!e->mMessage) {
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
return nullptr;