Bug 1174064 - Ensure we don't try to reuse a GMP doing async shutdown. r=edwin

This commit is contained in:
Chris Pearce 2015-06-12 21:36:48 +12:00
Родитель 1840048bb9
Коммит 8f7534bb5d
1 изменённых файлов: 10 добавлений и 8 удалений

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

@ -808,19 +808,21 @@ GMPParent::ReadGMPMetaData()
bool
GMPParent::CanBeSharedCrossNodeIds() const
{
return mNodeId.IsEmpty() &&
// XXX bug 1159300 hack -- maybe remove after openh264 1.4
// We don't want to use CDM decoders for non-encrypted playback
// just yet; especially not for WebRTC. Don't allow CDMs to be used
// without a node ID.
!mCanDecrypt;
return !mAsyncShutdownInProgress &&
mNodeId.IsEmpty() &&
// XXX bug 1159300 hack -- maybe remove after openh264 1.4
// We don't want to use CDM decoders for non-encrypted playback
// just yet; especially not for WebRTC. Don't allow CDMs to be used
// without a node ID.
!mCanDecrypt;
}
bool
GMPParent::CanBeUsedFrom(const nsACString& aNodeId) const
{
return (mNodeId.IsEmpty() && State() == GMPStateNotLoaded) ||
mNodeId == aNodeId;
return !mAsyncShutdownInProgress &&
((mNodeId.IsEmpty() && State() == GMPStateNotLoaded) ||
mNodeId == aNodeId);
}
void