mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 667887 - Implement nsMappedAttributes::SizeOf(). r=jst,bz
This commit is contained in:
parent
79c9d3ee6f
commit
2179f30023
@ -108,6 +108,12 @@ public:
|
||||
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
|
||||
#endif
|
||||
|
||||
PRInt64 SizeOf() const {
|
||||
NS_ASSERTION(mAttrCount == mBufferSize,
|
||||
"mBufferSize and mAttrCount are expected to be the same.");
|
||||
return sizeof(*this) - sizeof(void*) + mAttrCount * sizeof(InternalAttr);
|
||||
}
|
||||
|
||||
private:
|
||||
nsMappedAttributes(const nsMappedAttributes& aCopy);
|
||||
~nsMappedAttributes();
|
||||
|
@ -540,7 +540,7 @@ GetHashEntryAttributesSize(PLDHashTable* aTable, PLDHashEntryHdr* aEntry,
|
||||
PRInt64 size = *static_cast<PRInt64*>(aArg);
|
||||
|
||||
NS_ASSERTION(entry->mAttributes, "entry->mAttributes should not be null!");
|
||||
size += sizeof(*entry->mAttributes);
|
||||
size += entry->mAttributes->SizeOf();
|
||||
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user