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

Unified Diff: Source/platform/heap/HeapAllocator.h

Issue 1155113002: Oilpan: HeapObjectHeader::checkHeader should not allow access on orphaned pages (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/TraceTraits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/HeapAllocator.h
diff --git a/Source/platform/heap/HeapAllocator.h b/Source/platform/heap/HeapAllocator.h
index 56bdb529f3a79e79945d891eef56bb4627bf7bf4..45ce9f91ed55d922088972cffbd6a7f5f88b8999 100644
--- a/Source/platform/heap/HeapAllocator.h
+++ b/Source/platform/heap/HeapAllocator.h
@@ -277,6 +277,7 @@ void HeapVectorBacking<T, Traits>::finalize(void* pointer)
ASSERT(!WTF::IsTriviallyDestructible<T>::value);
HeapObjectHeader* header = HeapObjectHeader::fromPayload(pointer);
+ header->checkHeader();
// Use the payload size as recorded by the heap to determine how many
// elements to finalize.
size_t length = header->payloadSize() / sizeof(T);
@@ -310,6 +311,7 @@ void HeapHashTableBacking<Table>::finalize(void* pointer)
using Value = typename Table::ValueType;
ASSERT(!WTF::IsTriviallyDestructible<Value>::value);
HeapObjectHeader* header = HeapObjectHeader::fromPayload(pointer);
+ header->checkHeader();
// Use the payload size as recorded by the heap to determine how many
// elements to finalize.
size_t length = header->payloadSize() / sizeof(Value);
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/TraceTraits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698