Backed out changeset 89c9d42ef78e (bug 1109954) for colliding with bug 1108701 on a CLOSED TREE.

This commit is contained in:
Bobby Holley 2014-12-10 22:56:09 -08:00
Родитель 6ec9fa2dd8
Коммит ed81da5593
7 изменённых файлов: 12 добавлений и 26 удалений

Просмотреть файл

@ -2491,9 +2491,10 @@ MediaDecoderStateMachine::ShutdownReader()
}
void
MediaDecoderStateMachine::FinishShutdown()
MediaDecoderStateMachine::FinishShutdown(bool aSuccess)
{
MOZ_ASSERT(OnStateMachineThread());
MOZ_ASSERT(aSuccess);
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
// The reader's listeners hold references to the state machine,

Просмотреть файл

@ -163,7 +163,7 @@ public:
void SetDormant(bool aDormant);
void Shutdown();
void ShutdownReader();
void FinishShutdown();
void FinishShutdown(bool aSuccess);
// Called from the main thread to get the duration. The decoder monitor
// must be obtained before calling this. It is in units of microseconds.

Просмотреть файл

@ -155,23 +155,6 @@ protected:
const char* mCallSite;
};
/*
* We create two specializations for invoking Resolve/Reject Methods so as to
* make the resolve/reject value argument "optional" via SFINAE.
*/
template<typename ThisType, typename ValueType>
static void InvokeCallbackMethod(ThisType* aThisVal, void(ThisType::*aMethod)(ValueType), ValueType aValue)
{
((*aThisVal).*aMethod)(aValue);
}
template<typename ThisType, typename ValueType>
static void InvokeCallbackMethod(ThisType* aThisVal, void(ThisType::*aMethod)(), ValueType aValue)
{
((*aThisVal).*aMethod)();
}
template<typename TargetType, typename ThisType,
typename ResolveMethodType, typename RejectMethodType>
class ThenValue : public ThenValueBase
@ -204,12 +187,12 @@ protected:
protected:
virtual void DoResolve(ResolveValueType aResolveValue)
{
InvokeCallbackMethod(mThisVal.get(), mResolveMethod, aResolveValue);
((*mThisVal).*mResolveMethod)(aResolveValue);
}
virtual void DoReject(RejectValueType aRejectValue)
{
InvokeCallbackMethod(mThisVal.get(), mRejectMethod, aRejectValue);
((*mThisVal).*mRejectMethod)(aRejectValue);
}
virtual ~ThenValue() {}

Просмотреть файл

@ -299,13 +299,14 @@ MediaSourceReader::Shutdown()
MOZ_ASSERT(mMediaSourceShutdownPromise.IsEmpty());
nsRefPtr<ShutdownPromise> p = mMediaSourceShutdownPromise.Ensure(__func__);
ContinueShutdown();
ContinueShutdown(true);
return p;
}
void
MediaSourceReader::ContinueShutdown()
MediaSourceReader::ContinueShutdown(bool aSuccess)
{
MOZ_ASSERT(aSuccess);
if (mTrackBuffers.Length()) {
mTrackBuffers[0]->Shutdown()->Then(GetTaskQueue(), __func__, this,
&MediaSourceReader::ContinueShutdown,

Просмотреть файл

@ -180,7 +180,7 @@ private:
bool mHasEssentialTrackBuffers;
void ContinueShutdown();
void ContinueShutdown(bool aSuccess);
MediaPromiseHolder<ShutdownPromise> mMediaSourceShutdownPromise;
#ifdef MOZ_FMP4
nsRefPtr<SharedDecoderManager> mSharedDecoderManager;

Просмотреть файл

@ -112,8 +112,9 @@ TrackBuffer::Shutdown()
}
void
TrackBuffer::ContinueShutdown()
TrackBuffer::ContinueShutdown(bool aSuccess)
{
MOZ_ASSERT(aSuccess);
ReentrantMonitorAutoEnter mon(mParentDecoder->GetReentrantMonitor());
if (mDecoders.Length()) {
mDecoders[0]->GetReader()->Shutdown()

Просмотреть файл

@ -160,7 +160,7 @@ private:
// Protected by mParentDecoder's monitor.
MediaInfo mInfo;
void ContinueShutdown();
void ContinueShutdown(bool aSuccess);
MediaPromiseHolder<ShutdownPromise> mShutdownPromise;
};