summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authorwin7-7 <win7-7@users.noreply.github.com>2019-06-26 01:51:45 +0300
committerwin7-7 <win7-7@users.noreply.github.com>2019-06-26 01:51:45 +0300
commit00812e30dfa70f9b1a752cf0d09de00f6d401c85 (patch)
treee7eec9b55dd4e5825d3196f196c7f981be56e17a /dom
parentd7359c38b197c221c43def1e24cb48d4aee51bba (diff)
downloadUXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar
UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar.gz
UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar.lz
UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar.xz
UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.zip
Attach FrameProperties to each frame instead of using a shared hashtable
Dispense the shared hashtable and instead attach the frame property list directly to nsIFrame.
Diffstat (limited to 'dom')
-rw-r--r--dom/base/nsDocument.cpp3
-rw-r--r--dom/base/nsWindowMemoryReporter.cpp9
-rw-r--r--dom/base/nsWindowMemoryReporter.h1
3 files changed, 12 insertions, 1 deletions
diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp
index a6ed419df..d8abc174f 100644
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -11943,7 +11943,8 @@ nsIDocument::DocAddSizeOfExcludingThis(nsWindowSizes* aWindowSizes) const
&aWindowSizes->mLayoutPresShellSize,
&aWindowSizes->mLayoutStyleSetsSize,
&aWindowSizes->mLayoutTextRunsSize,
- &aWindowSizes->mLayoutPresContextSize);
+ &aWindowSizes->mLayoutPresContextSize,
+ &aWindowSizes->mLayoutFramePropertiesSize);
}
aWindowSizes->mPropertyTablesSize +=
diff --git a/dom/base/nsWindowMemoryReporter.cpp b/dom/base/nsWindowMemoryReporter.cpp
index acec4acfb..8f4bf6b11 100644
--- a/dom/base/nsWindowMemoryReporter.cpp
+++ b/dom/base/nsWindowMemoryReporter.cpp
@@ -400,6 +400,12 @@ CollectWindowReports(nsGlobalWindow *aWindow,
aWindowTotalSizes->mLayoutPresContextSize +=
windowSizes.mLayoutPresContextSize;
+ REPORT_SIZE("/layout/frame-properties", windowSizes.mLayoutFramePropertiesSize,
+ "Memory used for frame properties attached to frames "
+ "within a window.");
+ aWindowTotalSizes->mLayoutFramePropertiesSize +=
+ windowSizes.mLayoutFramePropertiesSize;
+
// There are many different kinds of frames, but it is very likely
// that only a few matter. Implement a cutoff so we don't bloat
// about:memory with many uninteresting entries.
@@ -563,6 +569,9 @@ nsWindowMemoryReporter::CollectReports(nsIHandleReportCallback* aHandleReport,
REPORT("window-objects/layout/pres-contexts", windowTotalSizes.mLayoutPresContextSize,
"This is the sum of all windows' 'layout/pres-contexts' numbers.");
+ REPORT("window-objects/layout/frame-properties", windowTotalSizes.mLayoutFramePropertiesSize,
+ "This is the sum of all windows' 'layout/frame-properties' numbers.");
+
size_t frameTotal = 0;
#define FRAME_ID(classname) \
frameTotal += windowTotalSizes.mArenaStats.FRAME_ID_STAT_FIELD(classname);
diff --git a/dom/base/nsWindowMemoryReporter.h b/dom/base/nsWindowMemoryReporter.h
index b9e986959..5d40dc9f5 100644
--- a/dom/base/nsWindowMemoryReporter.h
+++ b/dom/base/nsWindowMemoryReporter.h
@@ -33,6 +33,7 @@ class nsWindowSizes {
macro(Style, mLayoutStyleSetsSize) \
macro(Other, mLayoutTextRunsSize) \
macro(Other, mLayoutPresContextSize) \
+ macro(Other, mLayoutFramePropertiesSize) \
macro(Other, mPropertyTablesSize) \
public: