tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 64d037700e8cfc0ae93f989a9a2c9810e3a52197
parent 9e4ec1d905ec3cc3249729244c1f66b8474da389
Author: Andrew McCreight <continuation@gmail.com>
Date:   Wed,  3 Dec 2025 13:53:36 +0000

Bug 2003609, part 1 - Use nsISizeOf::SizeOfIncludingThis. r=emilio

These are pointers, so their `this` is not part of the current
object, so we need to call SizeOfIncludingThis. This looks like
a mixup during inlining in HTMLLinkElement that got copied by
the more recent uses.

Differential Revision: https://phabricator.services.mozilla.com/D274833

Diffstat:
Mdom/html/HTMLImageElement.cpp | 2+-
Mdom/html/HTMLLinkElement.cpp | 2+-
Mdom/svg/SVGFEImageElement.cpp | 2+-
Mdom/svg/SVGImageElement.cpp | 2+-
Mdom/xul/nsXULElement.cpp | 2+-
5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dom/html/HTMLImageElement.cpp b/dom/html/HTMLImageElement.cpp @@ -1161,7 +1161,7 @@ void HTMLImageElement::AddSizeOfExcludingThis(nsWindowSizes& aSizes, size_t* aNodeSize) const { nsGenericHTMLElement::AddSizeOfExcludingThis(aSizes, aNodeSize); if (nsCOMPtr<nsISizeOf> iface = do_QueryInterface(mSrcURI)) { - *aNodeSize += iface->SizeOfExcludingThis(aSizes.mState.mMallocSizeOf); + *aNodeSize += iface->SizeOfIncludingThis(aSizes.mState.mMallocSizeOf); } } diff --git a/dom/html/HTMLLinkElement.cpp b/dom/html/HTMLLinkElement.cpp @@ -409,7 +409,7 @@ void HTMLLinkElement::AddSizeOfExcludingThis(nsWindowSizes& aSizes, size_t* aNodeSize) const { nsGenericHTMLElement::AddSizeOfExcludingThis(aSizes, aNodeSize); if (nsCOMPtr<nsISizeOf> iface = do_QueryInterface(mCachedURI)) { - *aNodeSize += iface->SizeOfExcludingThis(aSizes.mState.mMallocSizeOf); + *aNodeSize += iface->SizeOfIncludingThis(aSizes.mState.mMallocSizeOf); } } diff --git a/dom/svg/SVGFEImageElement.cpp b/dom/svg/SVGFEImageElement.cpp @@ -433,7 +433,7 @@ void SVGFEImageElement::AddSizeOfExcludingThis(nsWindowSizes& aSizes, size_t* aNodeSize) const { SVGElement::AddSizeOfExcludingThis(aSizes, aNodeSize); if (nsCOMPtr<nsISizeOf> iface = do_QueryInterface(mSrcURI)) { - *aNodeSize += iface->SizeOfExcludingThis(aSizes.mState.mMallocSizeOf); + *aNodeSize += iface->SizeOfIncludingThis(aSizes.mState.mMallocSizeOf); } } diff --git a/dom/svg/SVGImageElement.cpp b/dom/svg/SVGImageElement.cpp @@ -340,7 +340,7 @@ void SVGImageElement::AddSizeOfExcludingThis(nsWindowSizes& aSizes, size_t* aNodeSize) const { SVGElement::AddSizeOfExcludingThis(aSizes, aNodeSize); if (nsCOMPtr<nsISizeOf> iface = do_QueryInterface(mSrcURI)) { - *aNodeSize += iface->SizeOfExcludingThis(aSizes.mState.mMallocSizeOf); + *aNodeSize += iface->SizeOfIncludingThis(aSizes.mState.mMallocSizeOf); } } diff --git a/dom/xul/nsXULElement.cpp b/dom/xul/nsXULElement.cpp @@ -2014,7 +2014,7 @@ void nsXULPrototypeScript::Set(JS::Stencil* aStencil) { mStencil = aStencil; } void nsXULPrototypeScript::AddSizeOfExcludingThis(nsWindowSizes& aSizes, size_t* aNodeSize) const { if (nsCOMPtr<nsISizeOf> iface = do_QueryInterface(mSrcURI)) { - *aNodeSize += iface->SizeOfExcludingThis(aSizes.mState.mMallocSizeOf); + *aNodeSize += iface->SizeOfIncludingThis(aSizes.mState.mMallocSizeOf); } }