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

Unified Diff: third_party/WebKit/Source/platform/heap/HeapPage.cpp

Issue 2518273003: [Blink Heap] Move isLowEndDevice to Memory Coordinator, attempt #3 (Closed)
Patch Set: Created 4 years, 1 month 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
Index: third_party/WebKit/Source/platform/heap/HeapPage.cpp
diff --git a/third_party/WebKit/Source/platform/heap/HeapPage.cpp b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
index e0edb2e1cb6f01930868de70e6ff85118f7e5848..89a65566dbe00d96cb98946653cab24b50164ada 100644
--- a/third_party/WebKit/Source/platform/heap/HeapPage.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
@@ -31,10 +31,10 @@
#include "platform/heap/HeapPage.h"
#include "base/trace_event/process_memory_dump.h"
+#include "platform/MemoryCoordinator.h"
#include "platform/ScriptForbiddenScope.h"
#include "platform/heap/BlinkGCMemoryDumpProvider.h"
#include "platform/heap/CallbackStack.h"
-#include "platform/heap/Heap.h"
#include "platform/heap/MarkingVisitor.h"
#include "platform/heap/PageMemory.h"
#include "platform/heap/PagePool.h"
@@ -1225,7 +1225,7 @@ void NormalPage::sweep() {
#if !ENABLE(ASSERT) && !defined(LEAK_SANITIZER) && !defined(ADDRESS_SANITIZER)
// Discarding pages increases page faults and may regress performance.
// So we enable this only on low-RAM devices.
- if (ProcessHeap::isLowEndDevice())
+ if (MemoryCoordinator::isLowEndDevice())
discardPages(startOfGap + sizeof(FreeListEntry), headerAddress);
#endif
}
@@ -1237,7 +1237,7 @@ void NormalPage::sweep() {
if (startOfGap != payloadEnd()) {
pageArena->addToFreeList(startOfGap, payloadEnd() - startOfGap);
#if !ENABLE(ASSERT) && !defined(LEAK_SANITIZER) && !defined(ADDRESS_SANITIZER)
- if (ProcessHeap::isLowEndDevice())
+ if (MemoryCoordinator::isLowEndDevice())
discardPages(startOfGap + sizeof(FreeListEntry), payloadEnd());
#endif
}

Powered by Google App Engine
This is Rietveld 408576698