From 724e8623c987375541357dd195f7609c08ed0360 Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Sun, 11 Oct 2015 18:13:10 +0200 Subject: [PATCH] Bug 1212288 - Make ImageContainer::AllocateProducerID callable on all threads; r=roc --- gfx/layers/ImageContainer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gfx/layers/ImageContainer.cpp b/gfx/layers/ImageContainer.cpp index 50119d13c287..3bb80ebe44fb 100644 --- a/gfx/layers/ImageContainer.cpp +++ b/gfx/layers/ImageContainer.cpp @@ -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 sProducerID(0u); return ++sProducerID; }