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

Unified Diff: third_party/WebKit/Source/wtf/LeakAnnotations.h

Issue 1511833006: Document LEAK_SANITIZER_IGNORE_OBJECT() more precisely. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shorten comment Created 5 years 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: third_party/WebKit/Source/wtf/LeakAnnotations.h
diff --git a/third_party/WebKit/Source/wtf/LeakAnnotations.h b/third_party/WebKit/Source/wtf/LeakAnnotations.h
index 446992db6abf6cfefb9bc9473bcd08dc45da6daf..8dba58169c6faf03edbab5ae20700a51d9fe8275 100644
--- a/third_party/WebKit/Source/wtf/LeakAnnotations.h
+++ b/third_party/WebKit/Source/wtf/LeakAnnotations.h
@@ -34,11 +34,7 @@
// This file defines macros for working with LeakSanitizer, allowing memory
// and allocations to be registered as exempted from LSan consideration.
-//
-// LSan exempted memory will be treated as a source of live pointers,
-// i.e. heap objects reachable by following pointers from an exempted
-// object will not be reported as leaks.
-//
+
#include "wtf/Noncopyable.h"
#if USE(LEAK_SANITIZER)
#include "wtf/AddressSanitizer.h"
@@ -74,6 +70,12 @@ public:
// LEAK_SANITIZER_IGNORE_OBJECT(X): the heap object referenced by pointer X
// will be ignored by LSan.
+//
+// "Ignorance" means that LSan's reachability traversal is stopped short
+// upon encountering an ignored memory chunk. Consequently, LSan will not
+// scan an ignored memory chunk for live, reachable pointers. However, should
+// those embedded pointers be reachable by some other path, they will be
+// reported as leaking.
#define LEAK_SANITIZER_IGNORE_OBJECT(X) __lsan_ignore_object(X)
// If the object pointed to by the static local is on the Oilpan heap, a strong
« 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