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

Unified Diff: third_party/WebKit/Source/wtf/Partitions.h

Issue 1863753002: Remove ENABLE(OILPAN) uses in wtf/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More comment syncing Created 4 years, 8 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 | « third_party/WebKit/Source/wtf/PartitionAlloc.md ('k') | third_party/WebKit/Source/wtf/Partitions.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/Partitions.h
diff --git a/third_party/WebKit/Source/wtf/Partitions.h b/third_party/WebKit/Source/wtf/Partitions.h
index 194003948a6d8e64a5835d4e96486857bffad164..dc9a4aad108ac626cbf8897f0f8fab7eed2aef40 100644
--- a/third_party/WebKit/Source/wtf/Partitions.h
+++ b/third_party/WebKit/Source/wtf/Partitions.h
@@ -62,13 +62,8 @@ public:
ALWAYS_INLINE static PartitionRoot* nodePartition()
{
-#if ENABLE(OILPAN)
ASSERT_NOT_REACHED();
return nullptr;
-#else
- ASSERT(s_initialized);
- return m_nodeAllocator.root();
-#endif
}
ALWAYS_INLINE static PartitionRoot* layoutPartition()
{
@@ -79,12 +74,8 @@ public:
static size_t currentDOMMemoryUsage()
{
ASSERT(s_initialized);
-#if ENABLE(OILPAN)
ASSERT_NOT_REACHED();
return 0;
-#else
- return m_nodeAllocator.root()->totalSizeOfCommittedPages;
-#endif
}
static size_t totalSizeOfCommittedPages()
@@ -92,9 +83,6 @@ public:
size_t totalSize = 0;
totalSize += m_fastMallocAllocator.root()->totalSizeOfCommittedPages;
totalSize += m_bufferAllocator.root()->totalSizeOfCommittedPages;
-#if !ENABLE(OILPAN)
- totalSize += m_nodeAllocator.root()->totalSizeOfCommittedPages;
-#endif
totalSize += m_layoutAllocator.root()->totalSizeOfCommittedPages;
return totalSize;
}
@@ -143,14 +131,12 @@ private:
static bool s_initialized;
// We have the following four partitions.
- // - Node partition: A partition to allocate Nodes. We prepare a
- // dedicated partition for Nodes because Nodes are likely to be
- // a source of use-after-frees. Another reason is for performance:
- // Since Nodes are guaranteed to be used only by the main
- // thread, we can bypass acquiring a lock. Also we can improve memory
- // locality by putting Nodes together.
- // - Layout object partition: A partition to allocate LayoutObjects.
- // we prepare a dedicated partition for the same reason as Nodes.
+ // - LayoutObject partition: A partition to allocate LayoutObjects.
+ // We prepare a dedicated partition for LayoutObjects because they
+ // are likely to be a source of use-after-frees. Another reason
+ // is for performance: As LayoutObjects are guaranteed to only be used
+ // by the main thread, we can bypass acquiring a lock. Also we can
+ // improve memory locality by putting LayoutObjects together.
// - Buffer partition: A partition to allocate objects that have a strong
// risk where the length and/or the contents are exploited from user
// scripts. Vectors, HashTables, ArrayBufferContents and Strings are
@@ -158,9 +144,6 @@ private:
// - Fast malloc partition: A partition to allocate all other objects.
static PartitionAllocatorGeneric m_fastMallocAllocator;
static PartitionAllocatorGeneric m_bufferAllocator;
-#if !ENABLE(OILPAN)
- static SizeSpecificPartitionAllocator<3328> m_nodeAllocator;
-#endif
static SizeSpecificPartitionAllocator<1024> m_layoutAllocator;
static ReportPartitionAllocSizeFunction m_reportSizeFunction;
};
« no previous file with comments | « third_party/WebKit/Source/wtf/PartitionAlloc.md ('k') | third_party/WebKit/Source/wtf/Partitions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698