Remove nsISizeOfHandler and associated SizeOf methods. b=106792 r=bzbarsky sr=jst

git-svn-id: svn://10.0.0.236/trunk@138193 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%dbaron.org
2003-02-22 15:34:38 +00:00
parent 2497e53b86
commit e6a2b29ebf
250 changed files with 0 additions and 6676 deletions

View File

@@ -51,7 +51,6 @@
#include "nsHTMLAtoms.h"
#include "nsIHTMLContent.h"
#include "nsVoidArray.h"
#include "nsISizeOfHandler.h"
#include "nsCOMPtr.h"
#include "nsUnicharUtils.h"
@@ -291,16 +290,6 @@ struct HTMLAttribute {
return PR_FALSE;
}
#ifdef DEBUG
nsresult SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const {
if (!aResult) {
return NS_ERROR_NULL_POINTER;
}
*aResult = sizeof(*this);
return NS_OK;
}
#endif
nsHTMLAttrName mAttribute;
nsHTMLValue mValue;
HTMLAttribute* mNext;
@@ -358,8 +347,6 @@ public:
#ifdef DEBUG
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
void SizeOf(nsISizeOfHandler* aSizer, PRUint32 &aResult);
#endif
nsIHTMLStyleSheet* mSheet;
@@ -793,33 +780,6 @@ nsHTMLMappedAttributes::List(FILE* out, PRInt32 aIndent) const
}
return NS_OK;
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as nsHTMLMappedAttributes's size):
* 1) sizeof(*this)
*
* Contained / Aggregated data (not reported as nsHTMLMappedAttributes's size):
* none
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void nsHTMLMappedAttributes::SizeOf(nsISizeOfHandler* aSizer, PRUint32 &aResult)
{
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
// this is already accounted for
return;
}
nsCOMPtr<nsIAtom> tag;
tag = do_GetAtom("HTMLMappedAttributes");
aResult = sizeof(*this);
aSizer->AddSize(tag, aResult);
}
#endif
//--------------------
@@ -1583,48 +1543,6 @@ nsHTMLAttributes::List(FILE* out, PRInt32 aIndent) const
}
return NS_OK;
}
void nsHTMLAttributes::SizeOf(nsISizeOfHandler* aSizer, PRUint32 &aResult)
{
PRUint32 sum = 0;
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
// this is already accounted for
return;
}
// XXX step through this again
sum = sizeof(*this);
if (mAttrNames != mNameBuffer) {
sum += sizeof(*mAttrNames) * mAttrSize;
}
if (mFirstUnmapped) {
HTMLAttribute* ha = mFirstUnmapped;
while (ha) {
PRUint32 asum = 0;
ha->SizeOf(aSizer, &asum); // XXX Unique???
sum += asum;
ha = ha->mNext;
}
}
if (mMapped) {
PRBool recorded;
aSizer->RecordObject((void*)mMapped, &recorded);
if (!recorded) {
PRUint32 asum = 0;
mMapped->SizeOf(aSizer, asum); // XXX Unique???
sum += asum;
}
}
aResult = sum;
nsCOMPtr<nsIAtom> tag;
tag = do_GetAtom("nsHTMLAttributes");
aSizer->AddSize(tag, aResult);
}
#endif
nsresult