Loading content/base/src/nsMappedAttributes.h +6 −0 Original line number Diff line number Diff line Loading @@ -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(); Loading layout/style/nsHTMLStyleSheet.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
content/base/src/nsMappedAttributes.h +6 −0 Original line number Diff line number Diff line Loading @@ -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(); Loading
layout/style/nsHTMLStyleSheet.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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