Title: [218732] trunk/Source
- Revision
- 218732
- Author
- akl...@apple.com
- Date
- 2017-06-22 19:13:42 -0700 (Thu, 22 Jun 2017)
Log Message
Rename MemoryPressureHandler::setTabCount to setPageCount
https://bugs.webkit.org/show_bug.cgi?id=173750
Reviewed by Daniel Bates.
Source/WebCore:
* page/Page.cpp:
(WebCore::Page::~Page):
Source/WTF:
This function is counting WebCore::Page objects (excluding utility Pages used
by SVG-as-image and the web inspector) so let's name it appropriately.
Not all WebKit clients have tabs.
* wtf/MemoryPressureHandler.cpp:
(WTF::MemoryPressureHandler::setPageCount):
(WTF::MemoryPressureHandler::thresholdForMemoryKill):
(WTF::MemoryPressureHandler::measurementTimerFired):
(WTF::MemoryPressureHandler::setTabCount): Deleted.
* wtf/MemoryPressureHandler.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (218731 => 218732)
--- trunk/Source/WTF/ChangeLog 2017-06-23 01:18:39 UTC (rev 218731)
+++ trunk/Source/WTF/ChangeLog 2017-06-23 02:13:42 UTC (rev 218732)
@@ -1,3 +1,21 @@
+2017-06-22 Andreas Kling <akl...@apple.com>
+
+ Rename MemoryPressureHandler::setTabCount to setPageCount
+ https://bugs.webkit.org/show_bug.cgi?id=173750
+
+ Reviewed by Daniel Bates.
+
+ This function is counting WebCore::Page objects (excluding utility Pages used
+ by SVG-as-image and the web inspector) so let's name it appropriately.
+ Not all WebKit clients have tabs.
+
+ * wtf/MemoryPressureHandler.cpp:
+ (WTF::MemoryPressureHandler::setPageCount):
+ (WTF::MemoryPressureHandler::thresholdForMemoryKill):
+ (WTF::MemoryPressureHandler::measurementTimerFired):
+ (WTF::MemoryPressureHandler::setTabCount): Deleted.
+ * wtf/MemoryPressureHandler.h:
+
2017-06-21 Andreas Kling <akl...@apple.com>
Increase memory kill limits for WebContent processes that manage multiple tabs.
Modified: trunk/Source/WTF/wtf/MemoryPressureHandler.cpp (218731 => 218732)
--- trunk/Source/WTF/wtf/MemoryPressureHandler.cpp 2017-06-23 01:18:39 UTC (rev 218731)
+++ trunk/Source/WTF/wtf/MemoryPressureHandler.cpp 2017-06-23 02:13:42 UTC (rev 218732)
@@ -99,16 +99,16 @@
#endif
}
-void MemoryPressureHandler::setTabCount(unsigned tabCount)
+void MemoryPressureHandler::setPageCount(unsigned pageCount)
{
- if (singleton().m_tabCount == tabCount)
+ if (singleton().m_pageCount == pageCount)
return;
- singleton().m_tabCount = tabCount;
+ singleton().m_pageCount = pageCount;
}
size_t MemoryPressureHandler::thresholdForMemoryKill()
{
- return thresholdForMemoryKillWithProcessState(m_processState, m_tabCount);
+ return thresholdForMemoryKillWithProcessState(m_processState, m_pageCount);
}
static size_t thresholdForPolicy(MemoryUsagePolicy policy)
@@ -189,7 +189,7 @@
break;
}
- if (processState() == WebsamProcessState::Active && footprint.value() > thresholdForMemoryKillWithProcessState(WebsamProcessState::Inactive, m_tabCount))
+ if (processState() == WebsamProcessState::Active && footprint.value() > thresholdForMemoryKillWithProcessState(WebsamProcessState::Inactive, m_pageCount))
doesExceedInactiveLimitWhileActive();
else
doesNotExceedInactiveLimitWhileActive();
Modified: trunk/Source/WTF/wtf/MemoryPressureHandler.h (218731 => 218732)
--- trunk/Source/WTF/wtf/MemoryPressureHandler.h 2017-06-23 01:18:39 UTC (rev 218731)
+++ trunk/Source/WTF/wtf/MemoryPressureHandler.h 2017-06-23 02:13:42 UTC (rev 218732)
@@ -147,7 +147,7 @@
WTF_EXPORT_PRIVATE void setProcessState(WebsamProcessState);
WebsamProcessState processState() const { return m_processState; }
- WTF_EXPORT_PRIVATE static void setTabCount(unsigned);
+ WTF_EXPORT_PRIVATE static void setPageCount(unsigned);
private:
size_t thresholdForMemoryKill();
@@ -192,7 +192,7 @@
WebsamProcessState m_processState { WebsamProcessState::Inactive };
- unsigned m_tabCount { 0 };
+ unsigned m_pageCount { 0 };
bool m_installed { false };
LowMemoryHandler m_lowMemoryHandler;
Modified: trunk/Source/WebCore/ChangeLog (218731 => 218732)
--- trunk/Source/WebCore/ChangeLog 2017-06-23 01:18:39 UTC (rev 218731)
+++ trunk/Source/WebCore/ChangeLog 2017-06-23 02:13:42 UTC (rev 218732)
@@ -1,3 +1,13 @@
+2017-06-22 Andreas Kling <akl...@apple.com>
+
+ Rename MemoryPressureHandler::setTabCount to setPageCount
+ https://bugs.webkit.org/show_bug.cgi?id=173750
+
+ Reviewed by Daniel Bates.
+
+ * page/Page.cpp:
+ (WebCore::Page::~Page):
+
2017-06-22 Antoine Quint <grao...@apple.com>
Modern media controls localised strings are out of sync with used strings in code
Modified: trunk/Source/WebCore/page/Page.cpp (218731 => 218732)
--- trunk/Source/WebCore/page/Page.cpp 2017-06-23 01:18:39 UTC (rev 218731)
+++ trunk/Source/WebCore/page/Page.cpp 2017-06-23 02:13:42 UTC (rev 218732)
@@ -289,7 +289,7 @@
allPages->add(this);
if (!isUtilityPage()) {
++nonUtilityPageCount;
- MemoryPressureHandler::setTabCount(nonUtilityPageCount);
+ MemoryPressureHandler::setPageCount(nonUtilityPageCount);
}
#ifndef NDEBUG
@@ -318,7 +318,7 @@
allPages->remove(this);
if (!isUtilityPage()) {
--nonUtilityPageCount;
- MemoryPressureHandler::setTabCount(nonUtilityPageCount);
+ MemoryPressureHandler::setPageCount(nonUtilityPageCount);
}
m_settings->pageDestroyed();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes