mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-06 00:10:25 +00:00
Bug 1323929 - Change the reject value type from nsresult to MediaResult. r=jya
MozReview-Commit-ID: 7ld7elZCN50 --HG-- extra : rebase_source : 27cf8d6a36542ac94e0ace663525d0c4c1b5d917
This commit is contained in:
parent
8b0a76cbdd
commit
4c8150312c
@ -70,7 +70,7 @@ public:
|
||||
MozPromise<RefPtr<MetadataHolder>, MediaResult, IsExclusive>;
|
||||
using MediaDataPromise =
|
||||
MozPromise<RefPtr<MediaData>, MediaResult, IsExclusive>;
|
||||
using SeekPromise = MozPromise<media::TimeUnit, nsresult, IsExclusive>;
|
||||
using SeekPromise = MozPromise<media::TimeUnit, MediaResult, IsExclusive>;
|
||||
|
||||
// Note that, conceptually, WaitForData makes sense in a non-exclusive sense.
|
||||
// But in the current architecture it's only ever used exclusively (by MDSM),
|
||||
|
@ -1060,8 +1060,8 @@ private:
|
||||
[this] (media::TimeUnit aUnit) {
|
||||
OnSeekResolved(aUnit);
|
||||
},
|
||||
[this] (nsresult aResult) {
|
||||
OnSeekRejected(aResult);
|
||||
[this] (const MediaResult& aError) {
|
||||
OnSeekRejected(aError);
|
||||
}));
|
||||
}
|
||||
|
||||
@ -1110,11 +1110,11 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
void OnSeekRejected(nsresult aResult) {
|
||||
void OnSeekRejected(const MediaResult& aError) {
|
||||
mSeekRequest.Complete();
|
||||
|
||||
MOZ_ASSERT(NS_FAILED(aResult), "Cancels should also disconnect mSeekRequest");
|
||||
OnSeekTaskRejected(aResult);
|
||||
MOZ_ASSERT(NS_FAILED(aError), "Cancels should also disconnect mSeekRequest");
|
||||
OnSeekTaskRejected(aError);
|
||||
}
|
||||
|
||||
void RequestAudioData()
|
||||
@ -1290,7 +1290,7 @@ private:
|
||||
SeekCompleted();
|
||||
}
|
||||
|
||||
void OnSeekTaskRejected(MediaResult aError)
|
||||
void OnSeekTaskRejected(const MediaResult& aError)
|
||||
{
|
||||
if (mIsAudioQueueFinished) {
|
||||
AudioQueue().Finish();
|
||||
|
Loading…
Reference in New Issue
Block a user