Back out 2f60f94d4d3c and d06c2e71aca2 for cross-platform breakage.

This commit is contained in:
Ralph Giles 2014-08-22 15:13:03 -07:00
parent 948ebc5e2c
commit 68b266f440
2 changed files with 3 additions and 14 deletions

View File

@ -159,7 +159,7 @@ Assertion::Assertion(nsIRDFResource* aSource)
mRefCnt(0),
mHashEntry(true)
{
MOZ_COUNT_CTOR(Assertion);
MOZ_COUNT_CTOR(RDF_Assertion);
NS_ADDREF(mSource);
@ -176,7 +176,7 @@ Assertion::Assertion(nsIRDFResource* aSource,
mRefCnt(0),
mHashEntry(false)
{
MOZ_COUNT_CTOR(Assertion);
MOZ_COUNT_CTOR(RDF_Assertion);
u.as.mProperty = aProperty;
u.as.mTarget = aTarget;
@ -199,7 +199,7 @@ Assertion::~Assertion()
u.hash.mPropertyHash = nullptr;
}
MOZ_COUNT_DTOR(Assertion);
MOZ_COUNT_DTOR(RDF_Assertion);
#ifdef DEBUG_REFS
--gInstanceCount;
fprintf(stdout, "%d - RDF: Assertion\n", gInstanceCount);

View File

@ -152,37 +152,26 @@ private:
#define NS_LOG_RELEASE(_p, _rc, _type) \
NS_LogRelease((_p), (_rc), (_type))
#include "mozilla/TypeTraits.h"
#define MOZ_ASSERT_CLASSNAME(_type) \
static_assert(mozilla::IsClass<_type>::value, \
"Token '" #_type "' is not a class type.")
// Note that the following constructor/destructor logging macros are redundant
// for refcounted objects that log via the NS_LOG_ADDREF/NS_LOG_RELEASE macros.
// Refcount logging is preferred.
#define MOZ_COUNT_CTOR(_type) \
do { \
MOZ_ASSERT_CLASSNAME(_type); \
NS_LogCtor((void*)this, #_type, sizeof(*this)); \
} while (0)
#define MOZ_COUNT_CTOR_INHERITED(_type, _base) \
do { \
MOZ_ASSERT_CLASSNAME(_type); \
MOZ_ASSERT_CLASSNAME(_base); \
NS_LogCtor((void*)this, #_type, sizeof(*this) - sizeof(_base)); \
} while (0)
#define MOZ_COUNT_DTOR(_type) \
do { \
MOZ_ASSERT_CLASSNAME(_type); \
NS_LogDtor((void*)this, #_type, sizeof(*this)); \
} while (0)
#define MOZ_COUNT_DTOR_INHERITED(_type, _base) \
do { \
MOZ_ASSERT_CLASSNAME(_type); \
MOZ_ASSERT_CLASSNAME(_base); \
NS_LogDtor((void*)this, #_type, sizeof(*this) - sizeof(_base)); \
} while (0)