Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1137)

Unified Diff: Source/core/page/Page.cpp

Issue 1335373003: Have a Page's MemoryPurgeController be a separate allocation also. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/Page.h ('k') | Source/platform/MemoryPurgeController.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « Source/core/page/Page.h ('k') | Source/platform/MemoryPurgeController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698