Title: [209456] trunk/Source/WebCore
- Revision
- 209456
- Author
- [email protected]
- Date
- 2016-12-07 08:27:34 -0800 (Wed, 07 Dec 2016)
Log Message
[iOS] Remove bitrotted FrameLoader attempt to limit page caching under memory pressure.
<https://webkit.org/b/165527>
Reviewed by Antti Koivisto.
This code no longer does anything, as the page cache is hard capped
at 0 entries while under memory pressure.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (209455 => 209456)
--- trunk/Source/WebCore/ChangeLog 2016-12-07 15:32:27 UTC (rev 209455)
+++ trunk/Source/WebCore/ChangeLog 2016-12-07 16:27:34 UTC (rev 209456)
@@ -1,3 +1,16 @@
+2016-12-07 Andreas Kling <[email protected]>
+
+ [iOS] Remove bitrotted FrameLoader attempt to limit page caching under memory pressure.
+ <https://webkit.org/b/165527>
+
+ Reviewed by Antti Koivisto.
+
+ This code no longer does anything, as the page cache is hard capped
+ at 0 entries while under memory pressure.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::commitProvisionalLoad):
+
2016-12-06 Antoine Quint <[email protected]>
[Modern Media Controls] Use tap and pinch gestures on iOS
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (209455 => 209456)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2016-12-07 15:32:27 UTC (rev 209455)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2016-12-07 16:27:34 UTC (rev 209456)
@@ -136,7 +136,6 @@
#include "DocumentType.h"
#include "ResourceLoader.h"
#include "RuntimeApplicationChecks.h"
-#include "SystemMemory.h"
#include "WKContentObservation.h"
#endif
@@ -149,10 +148,6 @@
static const char defaultAcceptHeader[] = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
-#if PLATFORM(IOS)
-const int memoryLevelThresholdToPrunePageCache = 20;
-#endif
-
bool isBackForwardLoadType(FrameLoadType type)
{
switch (type) {
@@ -1766,27 +1761,6 @@
m_frame.document() ? m_frame.document()->url().stringCenterEllipsizedToLength().utf8().data() : "",
pdl ? pdl->url().stringCenterEllipsizedToLength().utf8().data() : "<no provisional DocumentLoader>");
-#if PLATFORM(IOS)
- // In the case where we are not navigating to a cached page, and the system is under (speculative) memory pressure,
- // we can try to preemptively release some of the pages in the cache.
- // FIXME: Right now the capacity is 1 on iOS devices with 256 MB of RAM, so this will always blow away the whole
- // page cache. We could still preemptively prune the page cache while navigating to a cached page if capacity > 1.
- // See <rdar://problem/11779846> for more details.
- if (!cachedPage) {
- if (MemoryPressureHandler::singleton().isUnderMemoryPressure()) {
- LOG(MemoryPressure, "Pruning page cache because under memory pressure at: %s", __PRETTY_FUNCTION__);
- LOG(PageCache, "Pruning page cache to 0 due to memory pressure");
- // Don't cache any page if we are under memory pressure.
- PageCache::singleton().pruneToSizeNow(0, PruningReason::MemoryPressure);
- } else if (systemMemoryLevel() <= memoryLevelThresholdToPrunePageCache) {
- LOG(MemoryPressure, "Pruning page cache because system memory level is %d at: %s", systemMemoryLevel(), __PRETTY_FUNCTION__);
- auto& pageCache = PageCache::singleton();
- LOG(PageCache, "Pruning page cache to %d due to low memory (level %d less or equal to %d threshold)", pageCache.maxSize() / 2, systemMemoryLevel(), memoryLevelThresholdToPrunePageCache);
- pageCache.pruneToSizeNow(pageCache.maxSize() / 2, PruningReason::MemoryPressure);
- }
- }
-#endif
-
willTransitionToCommitted();
if (!m_frame.tree().parent() && history().currentItem()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes