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:
JW Wang 2016-12-16 14:45:03 +08:00
parent 8b0a76cbdd
commit 4c8150312c
2 changed files with 7 additions and 7 deletions

View File

@ -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),

View File

@ -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();