mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 23:07:33 +09:00
Bug 1632717
This commit is contained in:
parent
fcb2242703
commit
0ae2d2fb2e
4 changed files with 24 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue