Index: Source/platform/heap/Heap.cpp |
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp |
index 5b702342bc246f69acd99c5af796ea64a2648cc7..54035dc1606a49f405e7e78f03989d78088e0c33 100644 |
--- a/Source/platform/heap/Heap.cpp |
+++ b/Source/platform/heap/Heap.cpp |
@@ -277,8 +277,16 @@ private: |
: m_reserved(reserved) |
, m_writable(writable) |
{ |
- // Leak Sanitizer runs before the shutdown sequence runs, and thus PageMemory objects |
- // are reported as leaking. So we annotate to let the Leak Sanitizer ignore PageMemory objects. |
+ // This annotation is for letting the Leak Sanitizer ignore PageMemory objects. |
earthdok
2014/05/08 09:32:16
small nit: "LeakSanitizer", not "the Leak Sanitize
haraken
2014/05/08 10:38:36
Done.
|
+ // |
+ // - The Leak Sanitizer runs before the shutdown sequence and reports unreachable memory blocks. |
+ // - The Leak Sanitizer only recognizes memory blocks allocated through malloc/new, |
+ // and we need special handling for mapped regions. |
+ // - The PageMemory object is only referenced by a HeapPage<Header> object, which is |
+ // located inside the mapped region, which is not released until the shutdown sequence. |
+ // |
+ // Given the above, we need to explicitly annotate that the Leak Sanitizer should ignore |
+ // PageMemory objects. |
WTF_ANNOTATE_LEAKING_OBJECT_PTR(this); |
ASSERT(reserved.contains(writable)); |