mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1351953 - Make DecryptJob::PostResult take a mozilla::Span instead of nsTArray. r=gerald
This means we can pass anything that converts implicitly to a Span to PostResult, including an nsTArray<uint8_t>. We can also pass a Span that contains the contents of a Shmem's buffer. MozReview-Commit-ID: 8AAcRmVCEVy --HG-- extra : rebase_source : 44dfbc465db14bb689a653e6c0b3cbc626c0a0d1
This commit is contained in:
parent
fb5a8a3e0d
commit
37ae2a9f5a
@ -31,7 +31,7 @@ DecryptJob::PostResult(DecryptStatus aResult)
|
||||
|
||||
void
|
||||
DecryptJob::PostResult(DecryptStatus aResult,
|
||||
const nsTArray<uint8_t>& aDecryptedData)
|
||||
Span<const uint8_t> aDecryptedData)
|
||||
{
|
||||
if (aDecryptedData.Length() != mSample->Size()) {
|
||||
NS_WARNING("CDM returned incorrect number of decrypted bytes");
|
||||
|
@ -8,6 +8,7 @@
|
||||
#define DecryptJob_h_
|
||||
|
||||
#include "mozilla/CDMProxy.h"
|
||||
#include "mozilla/Span.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@ -17,8 +18,7 @@ public:
|
||||
|
||||
explicit DecryptJob(MediaRawData* aSample);
|
||||
|
||||
void PostResult(DecryptStatus aResult,
|
||||
const nsTArray<uint8_t>& aDecryptedData);
|
||||
void PostResult(DecryptStatus aResult, Span<const uint8_t> aDecryptedData);
|
||||
void PostResult(DecryptStatus aResult);
|
||||
|
||||
RefPtr<DecryptPromise> Ensure();
|
||||
|
Loading…
Reference in New Issue
Block a user