This commit is contained in:
warren%netscape.com 2000-10-28 02:46:30 +00:00
Родитель d40d02e6af
Коммит c988bb8a22
3 изменённых файлов: 18 добавлений и 6 удалений

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

@ -2007,7 +2007,7 @@ private: // all data and methods private: only friends have access
PRUint32 mRefCnt; PRUint32 mRefCnt;
PRUint32 mCRC; PRUint32 mCRC;
#ifdef NS_ENABLE_LOGGING #ifdef DEBUG
static PRUint32 gInstanceCount; static PRUint32 gInstanceCount;
#endif #endif
}; };
@ -2031,14 +2031,16 @@ PRUint32 nsStyleContextData::Release(void)
--mRefCnt; --mRefCnt;
NS_LOG_RELEASE(this,mRefCnt,"nsStyleContextData"); NS_LOG_RELEASE(this,mRefCnt,"nsStyleContextData");
if (0 == mRefCnt) { if (0 == mRefCnt) {
#ifdef DEBUG
PRINTF("deleting nsStyleContextData instance: (%ld)\n", (long)(--gInstanceCount)); PRINTF("deleting nsStyleContextData instance: (%ld)\n", (long)(--gInstanceCount));
#endif
delete this; delete this;
return 0; return 0;
} }
return mRefCnt; return mRefCnt;
} }
#ifdef NS_ENABLE_LOGGING #ifdef DEBUG
/*static*/ PRUint32 nsStyleContextData::gInstanceCount; /*static*/ PRUint32 nsStyleContextData::gInstanceCount;
#endif // DEBUG #endif // DEBUG
@ -2050,8 +2052,10 @@ nsStyleContextData *nsStyleContextData::Create(nsIPresContext *aPresContext)
pData = new nsStyleContextData(aPresContext); pData = new nsStyleContextData(aPresContext);
if (pData) { if (pData) {
NS_ADDREF(pData); NS_ADDREF(pData);
#ifdef DEBUG
PRINTF("new nsStyleContextData instance: (%ld) CRC=%lu\n", PRINTF("new nsStyleContextData instance: (%ld) CRC=%lu\n",
(long)(++gInstanceCount), (unsigned long)pData->ComputeCRC32(0)); (long)(++gInstanceCount), (unsigned long)pData->ComputeCRC32(0));
#endif
} }
} }
return pData; return pData;

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

@ -2007,7 +2007,7 @@ private: // all data and methods private: only friends have access
PRUint32 mRefCnt; PRUint32 mRefCnt;
PRUint32 mCRC; PRUint32 mCRC;
#ifdef NS_ENABLE_LOGGING #ifdef DEBUG
static PRUint32 gInstanceCount; static PRUint32 gInstanceCount;
#endif #endif
}; };
@ -2031,14 +2031,16 @@ PRUint32 nsStyleContextData::Release(void)
--mRefCnt; --mRefCnt;
NS_LOG_RELEASE(this,mRefCnt,"nsStyleContextData"); NS_LOG_RELEASE(this,mRefCnt,"nsStyleContextData");
if (0 == mRefCnt) { if (0 == mRefCnt) {
#ifdef DEBUG
PRINTF("deleting nsStyleContextData instance: (%ld)\n", (long)(--gInstanceCount)); PRINTF("deleting nsStyleContextData instance: (%ld)\n", (long)(--gInstanceCount));
#endif
delete this; delete this;
return 0; return 0;
} }
return mRefCnt; return mRefCnt;
} }
#ifdef NS_ENABLE_LOGGING #ifdef DEBUG
/*static*/ PRUint32 nsStyleContextData::gInstanceCount; /*static*/ PRUint32 nsStyleContextData::gInstanceCount;
#endif // DEBUG #endif // DEBUG
@ -2050,8 +2052,10 @@ nsStyleContextData *nsStyleContextData::Create(nsIPresContext *aPresContext)
pData = new nsStyleContextData(aPresContext); pData = new nsStyleContextData(aPresContext);
if (pData) { if (pData) {
NS_ADDREF(pData); NS_ADDREF(pData);
#ifdef DEBUG
PRINTF("new nsStyleContextData instance: (%ld) CRC=%lu\n", PRINTF("new nsStyleContextData instance: (%ld) CRC=%lu\n",
(long)(++gInstanceCount), (unsigned long)pData->ComputeCRC32(0)); (long)(++gInstanceCount), (unsigned long)pData->ComputeCRC32(0));
#endif
} }
} }
return pData; return pData;

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

@ -2007,7 +2007,7 @@ private: // all data and methods private: only friends have access
PRUint32 mRefCnt; PRUint32 mRefCnt;
PRUint32 mCRC; PRUint32 mCRC;
#ifdef NS_ENABLE_LOGGING #ifdef DEBUG
static PRUint32 gInstanceCount; static PRUint32 gInstanceCount;
#endif #endif
}; };
@ -2031,14 +2031,16 @@ PRUint32 nsStyleContextData::Release(void)
--mRefCnt; --mRefCnt;
NS_LOG_RELEASE(this,mRefCnt,"nsStyleContextData"); NS_LOG_RELEASE(this,mRefCnt,"nsStyleContextData");
if (0 == mRefCnt) { if (0 == mRefCnt) {
#ifdef DEBUG
PRINTF("deleting nsStyleContextData instance: (%ld)\n", (long)(--gInstanceCount)); PRINTF("deleting nsStyleContextData instance: (%ld)\n", (long)(--gInstanceCount));
#endif
delete this; delete this;
return 0; return 0;
} }
return mRefCnt; return mRefCnt;
} }
#ifdef NS_ENABLE_LOGGING #ifdef DEBUG
/*static*/ PRUint32 nsStyleContextData::gInstanceCount; /*static*/ PRUint32 nsStyleContextData::gInstanceCount;
#endif // DEBUG #endif // DEBUG
@ -2050,8 +2052,10 @@ nsStyleContextData *nsStyleContextData::Create(nsIPresContext *aPresContext)
pData = new nsStyleContextData(aPresContext); pData = new nsStyleContextData(aPresContext);
if (pData) { if (pData) {
NS_ADDREF(pData); NS_ADDREF(pData);
#ifdef DEBUG
PRINTF("new nsStyleContextData instance: (%ld) CRC=%lu\n", PRINTF("new nsStyleContextData instance: (%ld) CRC=%lu\n",
(long)(++gInstanceCount), (unsigned long)pData->ComputeCRC32(0)); (long)(++gInstanceCount), (unsigned long)pData->ComputeCRC32(0));
#endif
} }
} }
return pData; return pData;