Bug 1281082 - Move static_assert in NS_DECL_THREADSAFE_FFI_REFCOUNTING to the IMPL. r=bholley

This commit is contained in:
Cameron McCormack 2016-06-22 09:57:43 +10:00
Родитель fcd9433659
Коммит a80b00abf4
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -49,12 +49,12 @@ class nsStyleCoord;
struct nsStyleDisplay; struct nsStyleDisplay;
#define NS_DECL_THREADSAFE_FFI_REFCOUNTING(class_, name_) \ #define NS_DECL_THREADSAFE_FFI_REFCOUNTING(class_, name_) \
static_assert(class_::HasThreadSafeRefCnt::value, \
"NS_DECL_THREADSAFE_FFI_REFCOUNTING can only be used with " \
"classes that have thread-safe refcounting"); \
void Gecko_AddRef##name_##ArbitraryThread(class_* aPtr); \ void Gecko_AddRef##name_##ArbitraryThread(class_* aPtr); \
void Gecko_Release##name_##ArbitraryThread(class_* aPtr); void Gecko_Release##name_##ArbitraryThread(class_* aPtr);
#define NS_IMPL_THREADSAFE_FFI_REFCOUNTING(class_, name_) \ #define NS_IMPL_THREADSAFE_FFI_REFCOUNTING(class_, name_) \
static_assert(class_::HasThreadSafeRefCnt::value, \
"NS_DECL_THREADSAFE_FFI_REFCOUNTING can only be used with " \
"classes that have thread-safe refcounting"); \
void Gecko_AddRef##name_##ArbitraryThread(class_* aPtr) \ void Gecko_AddRef##name_##ArbitraryThread(class_* aPtr) \
{ NS_ADDREF(aPtr); } \ { NS_ADDREF(aPtr); } \
void Gecko_Release##name_##ArbitraryThread(class_* aPtr) \ void Gecko_Release##name_##ArbitraryThread(class_* aPtr) \