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

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

Issue 2717613004: A per-heap RegionTree needs no lock. (Closed)
Patch Set: Created 3 years, 10 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/platform/heap/PageMemory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/PageMemory.cpp
diff --git a/third_party/WebKit/Source/platform/heap/PageMemory.cpp b/third_party/WebKit/Source/platform/heap/PageMemory.cpp
index 967c764c89762aca8e4bd97c018c80f0d3c07304..faa6548c6f3f07c9efcda8522efbdb5daeb1673d 100644
--- a/third_party/WebKit/Source/platform/heap/PageMemory.cpp
+++ b/third_party/WebKit/Source/platform/heap/PageMemory.cpp
@@ -72,7 +72,6 @@ PageMemoryRegion* PageMemoryRegion::allocate(size_t size,
}
PageMemoryRegion* RegionTree::lookup(Address address) {
- MutexLocker locker(m_mutex);
RegionTreeNode* current = m_root;
while (current) {
Address base = current->m_region->base();
@@ -93,7 +92,6 @@ PageMemoryRegion* RegionTree::lookup(Address address) {
void RegionTree::add(PageMemoryRegion* region) {
ASSERT(region);
RegionTreeNode* newTree = new RegionTreeNode(region);
- MutexLocker locker(m_mutex);
newTree->addTo(&m_root);
}
@@ -108,11 +106,6 @@ void RegionTreeNode::addTo(RegionTreeNode** context) {
}
void RegionTree::remove(PageMemoryRegion* region) {
- // Deletion of large objects (and thus their regions) can happen
- // concurrently on sweeper threads. Removal can also happen during thread
- // shutdown, but that case is safe. Regardless, we make all removals
- // mutually exclusive.
- MutexLocker locker(m_mutex);
ASSERT(region);
ASSERT(m_root);
Address base = region->base();
« no previous file with comments | « third_party/WebKit/Source/platform/heap/PageMemory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698