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

Unified Diff: Source/platform/heap/Heap.cpp

Issue 278433007: Oilpan: Update a comment for the WTF_ANNOTATE_LEAKING_OBJECT_PTR macro in PageMemory (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698