Bug 1212288 - Make ImageContainer::AllocateProducerID callable on all threads; r=roc

This commit is contained in:
Sebastian Hengst 2015-10-11 18:13:10 +02:00
Родитель daeb9f7f13
Коммит 724e8623c9
1 изменённых файлов: 2 добавлений и 3 удалений

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

@ -673,12 +673,11 @@ ImageContainer::NotifyComposite(const ImageCompositeNotification& aNotification)
}
}
static ImageContainer::ProducerID sProducerID = 0;
ImageContainer::ProducerID
ImageContainer::AllocateProducerID()
{
NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
// Callable on all threads.
static Atomic<ImageContainer::ProducerID> sProducerID(0u);
return ++sProducerID;
}