From 6e94f79a855ddb7e313a683401038d0274f53bf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 8 Apr 2019 14:56:38 +0200 Subject: [PATCH] Bug 1542263 - Measure the styleset memory usage from the document, not the pres shell. --- dom/base/Document.cpp | 2 ++ layout/base/PresShell.cpp | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp index 3330ba5ccf98..7000333b3db4 100644 --- a/dom/base/Document.cpp +++ b/dom/base/Document.cpp @@ -11155,6 +11155,8 @@ void Document::DocAddSizeOfExcludingThis(nsWindowSizes& aWindowSizes) const { mPresShell->AddSizeOfIncludingThis(aWindowSizes); } + mStyleSet->AddSizeOfIncludingThis(aWindowSizes); + aWindowSizes.mDOMOtherSize += mLangGroupFontPrefs.SizeOfExcludingThis( aWindowSizes.mState.mMallocSizeOf); diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp index 3f1beee6190f..72b8d87a2385 100644 --- a/layout/base/PresShell.cpp +++ b/layout/base/PresShell.cpp @@ -10559,8 +10559,6 @@ void PresShell::AddSizeOfIncludingThis(nsWindowSizes& aSizes) const { mPendingScrollAnchorSelection.ShallowSizeOfExcludingThis(mallocSizeOf) + mPendingScrollAnchorAdjustment.ShallowSizeOfExcludingThis(mallocSizeOf); - StyleSet()->AddSizeOfIncludingThis(aSizes); - aSizes.mLayoutTextRunsSize += SizeOfTextRuns(mallocSizeOf); aSizes.mLayoutPresContextSize +=