Bug 1026718 - Expand MOZ_DECLARE_REFCOUNTED_TYPENAME unconditioanlly in order to make it available outside of libxul as well; r=Waldo

This commit is contained in:
Ehsan Akhgari 2014-06-18 20:11:21 -04:00
parent 502b0ac364
commit 95cc33a82f

View File

@ -155,18 +155,20 @@ class RefCounted
};
#ifdef MOZ_REFCOUNTED_LEAK_CHECKING
#define MOZ_DECLARE_REFCOUNTED_TYPENAME(T) \
const char* typeName() const { return #T; } \
size_t typeSize() const { return sizeof(*this); }
#define MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(T) \
virtual const char* typeName() const { return #T; } \
virtual size_t typeSize() const { return sizeof(*this); }
#else
#define MOZ_DECLARE_REFCOUNTED_TYPENAME(T)
#define MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(T)
#endif
// Note that this macro is expanded unconditionally because it declares only
// two small inline functions which will hopefully get eliminated by the linker
// in non-leak-checking builds.
#define MOZ_DECLARE_REFCOUNTED_TYPENAME(T) \
const char* typeName() const { return #T; } \
size_t typeSize() const { return sizeof(*this); }
}
template<typename T>