Bug 537572 - 'Workers: nsLayoutStatics refcounting isn't threadsafe, triggered via nsContentUtils::WrapNative'. r=bent.

This commit is contained in:
L. David Baron 2010-02-25 13:05:54 -08:00
Родитель b55c942063
Коммит 5c6daa7495
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -395,6 +395,9 @@ nsLayoutStatics::Shutdown()
void
nsLayoutStatics::AddRef()
{
NS_ASSERTION(NS_IsMainThread(),
"nsLayoutStatics reference counting must be on main thread");
NS_ASSERTION(sLayoutStaticRefcnt,
"nsLayoutStatics already dropped to zero!");
@ -406,6 +409,9 @@ nsLayoutStatics::AddRef()
void
nsLayoutStatics::Release()
{
NS_ASSERTION(NS_IsMainThread(),
"nsLayoutStatics reference counting must be on main thread");
--sLayoutStaticRefcnt;
NS_LOG_RELEASE(&sLayoutStaticRefcnt, sLayoutStaticRefcnt,
"nsLayoutStatics");