Bug 800187 (part 2) - Add a clarifying comment about memory reporter registration. r=bz.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 11 Oct 2012 21:05:42 -0700
changeset 110372 ea223d8ba0f0177f8afe5cc06661ad69955f498d
parent 110371 d58328861bf3994a6a78d462876fa44b582fb142
child 110373 10937fecf663f12c08e1ac59866fef3bbdba5ac5
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersbz
bugs800187
milestone19.0a1
Bug 800187 (part 2) - Add a clarifying comment about memory reporter registration. r=bz.
xpcom/base/nsIMemoryReporter.idl
--- a/xpcom/base/nsIMemoryReporter.idl
+++ b/xpcom/base/nsIMemoryReporter.idl
@@ -439,16 +439,20 @@ interface nsIMemoryReporterManager : nsI
         NS_MEMORY_REPORTER_IMPLEMENT_HELPER(_c, _p, _k, _u, _a, _d, _THREADSAFE_)
 #define NS_FALLIBLE_MEMORY_REPORTER_IMPLEMENT(_c, _p, _k, _u, _a, _d) \
         NS_FALLIBLE_MEMORY_REPORTER_IMPLEMENT_HELPER(_c, _p, _k, _u, _a, _d, _)
 #define NS_FALLIBLE_THREADSAFE_MEMORY_REPORTER_IMPLEMENT(_c, _p, _k, _u, _a, _d) \
         NS_FALLIBLE_MEMORY_REPORTER_IMPLEMENT_HELPER(_c, _p, _k, _u, _a, _d, _THREADSAFE_)
 
 #define NS_MEMORY_REPORTER_NAME(_classname)  MemoryReporter_##_classname
 
+// Note that the memory reporters are held in an nsCOMArray, which means
+// that individual reporters should be referenced with |nsIMemoryReporter *|
+// instead of nsCOMPtr<nsIMemoryReporter>.
+
 nsresult NS_RegisterMemoryReporter(nsIMemoryReporter *reporter);
 nsresult NS_RegisterMemoryMultiReporter(nsIMemoryMultiReporter *reporter);
 
 nsresult NS_UnregisterMemoryReporter(nsIMemoryReporter *reporter);
 nsresult NS_UnregisterMemoryMultiReporter(nsIMemoryMultiReporter *reporter);
 
 // Because DMDV is not a tool that comes with the standard Valgrind
 // distribution, we have to #include our own local copy of dmdv.h.  Ugly but