Bug 1111387 - Nullcheck mTaskQueue in TrackBuffer::QueueInitializeDecoder, as we can shutdown in between dispatching and running the task that calls QueueInitializeDecoder. r=cajbir

This commit is contained in:
Chris Pearce 2014-12-15 15:30:20 +13:00
parent 40e5bcfa85
commit f65c7d3575

View File

@ -348,6 +348,10 @@ TrackBuffer::NewDecoder()
bool
TrackBuffer::QueueInitializeDecoder(SourceBufferDecoder* aDecoder)
{
if (NS_WARN_IF(!mTaskQueue)) {
return false;
}
RefPtr<nsIRunnable> task =
NS_NewRunnableMethodWithArg<SourceBufferDecoder*>(this,
&TrackBuffer::InitializeDecoder,