| 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 8dc5d2d0155f2c76ae5d63252c4a9b1b2475f910..99733a57641124d5ff50ad005342f48da5e1fdbd 100644
|
| --- a/third_party/WebKit/Source/platform/heap/HeapPage.cpp
|
| +++ b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
|
| @@ -1502,16 +1502,22 @@ void NormalPage::sweepAndCompact(CompactionContext& context) {
|
| if (markedObjectSize)
|
| pageArena->getThreadState()->increaseMarkedObjectSize(markedObjectSize);
|
|
|
| + Address unusedStart;
|
| + size_t unusedSize;
|
| + if (currentPage != this) {
|
| + unusedStart = payload();
|
| + unusedSize = payloadSize();
|
| + } else {
|
| + unusedStart = payload() + allocationPoint;
|
| + unusedSize = payloadSize() - allocationPoint;
|
| + }
|
| #if ENABLE(ASSERT) || defined(LEAK_SANITIZER) || defined(ADDRESS_SANITIZER) || \
|
| defined(MEMORY_SANITIZER)
|
| // Zap the page, which is now available and will either be compacted into
|
| // or freed.
|
| - if (currentPage != this) {
|
| - FreeList::zapFreedMemory(payload(), payloadSize());
|
| - } else {
|
| - FreeList::zapFreedMemory(payload() + allocationPoint,
|
| - payloadSize() - allocationPoint);
|
| - }
|
| + FreeList::zapFreedMemory(unusedStart, unusedSize);
|
| +#else
|
| + memset(unusedStart, 0, unusedSize);
|
| #endif
|
| }
|
|
|
|
|