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 b4de4d6d292f7bcfbac371103896300017e9c8ac..ccf2c81f905e3ce7aa883f1d2400f44057e8d16e 100644 |
--- a/third_party/WebKit/Source/platform/heap/HeapPage.cpp |
+++ b/third_party/WebKit/Source/platform/heap/HeapPage.cpp |
@@ -699,7 +699,7 @@ bool NormalPageHeap::expandObject(HeapObjectHeader* header, size_t newSize) |
size_t allocationSize = Heap::allocationSizeFromSize(newSize); |
ASSERT(allocationSize > header->size()); |
size_t expandSize = allocationSize - header->size(); |
- if (header->payloadEnd() == m_currentAllocationPoint && expandSize <= m_remainingAllocationSize) { |
+ if (isObjectAllocatedAtAllocationPoint(header) && expandSize <= m_remainingAllocationSize) { |
m_currentAllocationPoint += expandSize; |
m_remainingAllocationSize -= expandSize; |
@@ -719,7 +719,7 @@ bool NormalPageHeap::shrinkObject(HeapObjectHeader* header, size_t newSize) |
size_t allocationSize = Heap::allocationSizeFromSize(newSize); |
ASSERT(header->size() > allocationSize); |
size_t shrinkSize = header->size() - allocationSize; |
- if (header->payloadEnd() == m_currentAllocationPoint) { |
+ if (isObjectAllocatedAtAllocationPoint(header)) { |
m_currentAllocationPoint -= shrinkSize; |
m_remainingAllocationSize += shrinkSize; |
SET_MEMORY_INACCESSIBLE(m_currentAllocationPoint, shrinkSize); |