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
parent 59e6c47221
commit f8ad08187f
2 changed files with 13 additions and 1 deletions

View File

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

View File

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