Bug 1071482 - Break a cycle in TrackBuffer and SourceBufferDecoder's MediaTaskQueue's SharedThreadPool. r=cajbir

This commit is contained in:
Chris Pearce 2014-10-28 13:21:13 +13:00
Родитель 1699179c49
Коммит 4276cea1b0
2 изменённых файлов: 13 добавлений и 1 удалений

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

@ -84,6 +84,18 @@ public:
mTaskQueue = aTaskQueue;
}
void BreakCycles()
{
if (mReader) {
mReader->BreakCycles();
mReader = nullptr;
}
mTaskQueue = nullptr;
#ifdef MOZ_EME
mCDMProxy = nullptr;
#endif
}
#ifdef MOZ_EME
virtual nsresult SetCDMProxy(CDMProxy* aProxy)
{

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

@ -391,7 +391,7 @@ TrackBuffer::BreakCycles()
MOZ_ASSERT(NS_IsMainThread());
for (uint32_t i = 0; i < mDecoders.Length(); ++i) {
mDecoders[i]->GetReader()->BreakCycles();
mDecoders[i]->BreakCycles();
}
mDecoders.Clear();