Remove nsISizeOfHandler and associated SizeOf methods. b=106792 r=bzbarsky sr=jst
git-svn-id: svn://10.0.0.236/trunk@183966 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
088b6f674f
commit
c433f6bbfc
@ -38,7 +38,6 @@
|
||||
#include "nsQuickSort.h"
|
||||
#include "prmem.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsISizeOfHandler.h"
|
||||
#include "nsString.h"
|
||||
#include "prbit.h"
|
||||
|
||||
@ -362,17 +361,6 @@ nsVoidArray::~nsVoidArray()
|
||||
PR_Free(NS_REINTERPRET_CAST(char*, mImpl));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void
|
||||
nsVoidArray::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const
|
||||
{
|
||||
if (aResult)
|
||||
{
|
||||
*aResult = sizeof(*this) + (mImpl ? SIZEOF_IMPL(GetArraySize()) : 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
PRInt32 nsVoidArray::IndexOf(void* aPossibleElement) const
|
||||
{
|
||||
if (mImpl)
|
||||
@ -759,23 +747,6 @@ nsStringArray::operator=(const nsStringArray& other)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void
|
||||
nsStringArray::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const
|
||||
{
|
||||
PRUint32 sum = 0;
|
||||
nsVoidArray::SizeOf(aHandler, &sum);
|
||||
PRInt32 index = Count();
|
||||
while (0 <= --index)
|
||||
{
|
||||
nsString* string = NS_STATIC_CAST(nsString*, ElementAt(index));
|
||||
PRUint32 size;
|
||||
string->SizeOf(aHandler, &size);
|
||||
sum += size;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
nsStringArray::StringAt(PRInt32 aIndex, nsAString& aString) const
|
||||
{
|
||||
@ -981,23 +952,6 @@ nsCStringArray::operator=(const nsCStringArray& other)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void
|
||||
nsCStringArray::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const
|
||||
{
|
||||
PRUint32 sum = 0;
|
||||
nsVoidArray::SizeOf(aHandler, &sum);
|
||||
PRInt32 index = Count();
|
||||
while (0 <= --index)
|
||||
{
|
||||
nsCString* string = NS_STATIC_CAST(nsCString*, mImpl->mArray[index]);
|
||||
PRUint32 size;
|
||||
string->SizeOf(aHandler, &size);
|
||||
sum += size;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
nsCStringArray::CStringAt(PRInt32 aIndex, nsCString& aCString) const
|
||||
{
|
||||
@ -1245,23 +1199,6 @@ nsSmallVoidArray::operator=(nsSmallVoidArray& other)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void
|
||||
nsSmallVoidArray::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const
|
||||
{
|
||||
if (aResult)
|
||||
{
|
||||
PRUint32 size = 0;
|
||||
if (HasVector())
|
||||
{
|
||||
nsVoidArray* ourArray = GetChildVector();
|
||||
ourArray->SizeOf(aHandler,&size);
|
||||
}
|
||||
*aResult = sizeof(*this) + size;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
PRInt32
|
||||
nsSmallVoidArray::GetArraySize() const
|
||||
{
|
||||
|
||||
@ -42,8 +42,6 @@
|
||||
#include "nscore.h"
|
||||
#include "nsAString.h"
|
||||
|
||||
class nsISizeOfHandler;
|
||||
|
||||
// Comparator callback function for sorting array values.
|
||||
typedef int (* PR_CALLBACK nsVoidArrayComparatorFunc)
|
||||
(const void* aElement1, const void* aElement2, void* aData);
|
||||
@ -60,10 +58,6 @@ public:
|
||||
|
||||
nsVoidArray& operator=(const nsVoidArray& other);
|
||||
|
||||
#ifdef DEBUG
|
||||
virtual void SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
#endif
|
||||
|
||||
inline PRInt32 Count() const {
|
||||
return mImpl ? mImpl->mCount : 0;
|
||||
}
|
||||
@ -212,10 +206,6 @@ public:
|
||||
|
||||
nsStringArray& operator=(const nsStringArray& other);
|
||||
|
||||
#ifdef DEBUG
|
||||
void SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
#endif
|
||||
|
||||
PRInt32 Count(void) const {
|
||||
return nsVoidArray::Count();
|
||||
}
|
||||
@ -277,10 +267,6 @@ public:
|
||||
// behavior as strtok().
|
||||
void ParseString(const char* string, const char* delimiter);
|
||||
|
||||
#ifdef DEBUG
|
||||
void SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
#endif
|
||||
|
||||
PRInt32 Count(void) const {
|
||||
return nsVoidArray::Count();
|
||||
}
|
||||
@ -355,9 +341,6 @@ public:
|
||||
nsSmallVoidArray& operator=(nsSmallVoidArray& other);
|
||||
void* operator[](PRInt32 aIndex) const { return ElementAt(aIndex); }
|
||||
|
||||
#ifdef DEBUG
|
||||
void SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
#endif
|
||||
PRInt32 GetArraySize() const;
|
||||
|
||||
PRInt32 Count() const;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user