зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1290364 - clear mOwner in Shutdown(). r=cpearce
MozReview-Commit-ID: 2CsYKcSrEOJ --HG-- extra : rebase_source : 3fd60ea1dbbf57c168fa8cebb9bb5594ee8c19fb
This commit is contained in:
Родитель
ae2e808431
Коммит
8ce157e06f
|
@ -162,7 +162,7 @@ MediaDecoderOwner*
|
|||
MediaDecoder::ResourceCallback::GetMediaOwner() const
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
return mDecoder ? mDecoder->GetOwner() : nullptr;
|
||||
return mDecoder ? mDecoder->mOwner : nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -571,7 +571,7 @@ MediaDecoder::MediaDecoder(MediaDecoderOwner* aOwner)
|
|||
"MediaDecoder::mMediaSeekable (Canonical)")
|
||||
, mMediaSeekableOnlyInBufferedRanges(AbstractThread::MainThread(), false,
|
||||
"MediaDecoder::mMediaSeekableOnlyInBufferedRanges (Canonical)")
|
||||
, mIsVisible(AbstractThread::MainThread(), !mOwner->IsHidden(),
|
||||
, mIsVisible(AbstractThread::MainThread(), !aOwner->IsHidden(),
|
||||
"MediaDecoder::mIsVisible (Canonical)")
|
||||
, mTelemetryReported(false)
|
||||
{
|
||||
|
@ -667,6 +667,7 @@ MediaDecoder::Shutdown()
|
|||
CancelDormantTimer();
|
||||
|
||||
ChangeState(PLAY_STATE_SHUTDOWN);
|
||||
mOwner = nullptr;
|
||||
}
|
||||
|
||||
MediaDecoder::~MediaDecoder()
|
||||
|
@ -1857,7 +1858,7 @@ MediaDecoder::GetOwner() const
|
|||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
// mOwner is valid until shutdown.
|
||||
return !IsShutdown() ? mOwner : nullptr;
|
||||
return mOwner;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -673,9 +673,9 @@ protected:
|
|||
void OnMetadataUpdate(TimedMetadata&& aMetadata);
|
||||
|
||||
// This should only ever be accessed from the main thread.
|
||||
// It is set in Init and cleared in Shutdown when the element goes away.
|
||||
// The decoder does not add a reference the element.
|
||||
MediaDecoderOwner* const mOwner;
|
||||
// It is set in the constructor and cleared in Shutdown when the element goes
|
||||
// away. The decoder does not add a reference the element.
|
||||
MediaDecoderOwner* mOwner;
|
||||
|
||||
// Counters related to decode and presentation of frames.
|
||||
const RefPtr<FrameStatistics> mFrameStats;
|
||||
|
|
Загрузка…
Ссылка в новой задаче