Index: Source/core/page/Page.cpp |
diff --git a/Source/core/page/Page.cpp b/Source/core/page/Page.cpp |
index ce956576bcff1a312e5c542415f2c0e755788b5d..5796f04850dd8ee386ef52849cf3f17358b886ae 100644 |
--- a/Source/core/page/Page.cpp |
+++ b/Source/core/page/Page.cpp |
@@ -47,6 +47,7 @@ |
#include "core/page/ValidationMessageClient.h" |
#include "core/page/scrolling/ScrollingCoordinator.h" |
#include "core/paint/DeprecatedPaintLayer.h" |
+#include "platform/MemoryPurgeController.h" |
#include "platform/graphics/GraphicsLayer.h" |
#include "platform/plugins/PluginData.h" |
#include "wtf/RefCountedLeakCounter.h" |
@@ -161,6 +162,14 @@ ScrollingCoordinator* Page::scrollingCoordinator() |
return m_scrollingCoordinator.get(); |
} |
+MemoryPurgeController& Page::memoryPurgeController() |
+{ |
+ if (!m_memoryPurgeController) |
+ m_memoryPurgeController = MemoryPurgeController::create(); |
+ |
+ return *m_memoryPurgeController; |
+} |
+ |
String Page::mainThreadScrollingReasonsAsText() |
{ |
if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator()) |
@@ -557,9 +566,9 @@ DEFINE_TRACE(Page) |
visitor->trace(m_validationMessageClient); |
visitor->trace(m_multisamplingChangedObservers); |
visitor->trace(m_frameHost); |
+ visitor->trace(m_memoryPurgeController); |
HeapSupplementable<Page>::trace(visitor); |
#endif |
- visitor->trace(m_memoryPurgeController); |
PageLifecycleNotifier::trace(visitor); |
} |