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

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

Issue 1757703004: Rename BaseHeap to BaseArena part 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 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
Index: third_party/WebKit/Source/platform/heap/HeapAllocator.cpp
diff --git a/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp b/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp
index 734aaa4ea70743cf7ec1f174af36012862939e2f..60a373bff0b0a2bf8a5c9069329e0b7b892eb19b 100644
--- a/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp
@@ -24,9 +24,9 @@ void HeapAllocator::backingFree(void* address)
HeapObjectHeader* header = HeapObjectHeader::fromPayload(address);
ASSERT(header->checkHeader());
- NormalPageHeap* heap = static_cast<NormalPage*>(page)->arenaForNormalPage();
+ NormalPageArena* arena = static_cast<NormalPage*>(page)->arenaForNormalPage();
state->promptlyFreed(header->gcInfoIndex());
- heap->promptlyFreeObject(header);
+ arena->promptlyFreeObject(header);
}
void HeapAllocator::freeVectorBacking(void* address)
@@ -63,10 +63,10 @@ bool HeapAllocator::backingExpand(void* address, size_t newSize)
HeapObjectHeader* header = HeapObjectHeader::fromPayload(address);
ASSERT(header->checkHeader());
- NormalPageHeap* heap = static_cast<NormalPage*>(page)->arenaForNormalPage();
- bool succeed = heap->expandObject(header, newSize);
+ NormalPageArena* arena = static_cast<NormalPage*>(page)->arenaForNormalPage();
+ bool succeed = arena->expandObject(header, newSize);
if (succeed)
- state->allocationPointAdjusted(heap->arenaIndex());
+ state->allocationPointAdjusted(arena->arenaIndex());
return succeed;
}
@@ -106,16 +106,16 @@ bool HeapAllocator::backingShrink(void* address, size_t quantizedCurrentSize, si
HeapObjectHeader* header = HeapObjectHeader::fromPayload(address);
ASSERT(header->checkHeader());
- NormalPageHeap* heap = static_cast<NormalPage*>(page)->arenaForNormalPage();
+ NormalPageArena* arena = static_cast<NormalPage*>(page)->arenaForNormalPage();
// We shrink the object only if the shrinking will make a non-small
// prompt-free block.
// FIXME: Optimize the threshold size.
- if (quantizedCurrentSize <= quantizedShrunkSize + sizeof(HeapObjectHeader) + sizeof(void*) * 32 && !heap->isObjectAllocatedAtAllocationPoint(header))
+ if (quantizedCurrentSize <= quantizedShrunkSize + sizeof(HeapObjectHeader) + sizeof(void*) * 32 && !arena->isObjectAllocatedAtAllocationPoint(header))
return true;
- bool succeededAtAllocationPoint = heap->shrinkObject(header, quantizedShrunkSize);
+ bool succeededAtAllocationPoint = arena->shrinkObject(header, quantizedShrunkSize);
if (succeededAtAllocationPoint)
- state->allocationPointAdjusted(heap->arenaIndex());
+ state->allocationPointAdjusted(arena->arenaIndex());
return true;
}
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapAllocator.h ('k') | third_party/WebKit/Source/platform/heap/HeapPage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698