Confirmed users, Bureaucrats and Sysops emeriti
419
edits
(Spec for Taras/dmandelin) |
m (may => must nits) |
||
Line 3: | Line 3: | ||
* If a class inherits from XPCOMGCFinalizedObject, the left-most base other than XPCOMGCFinalizedObject must be MMgc::GCFinalizedBase | * If a class inherits from XPCOMGCFinalizedObject, the left-most base other than XPCOMGCFinalizedObject must be MMgc::GCFinalizedBase | ||
* Certain classes may | * Certain classes may be allocated only on the stack or on the heap... bsmedberg is happy to annotate these classes. <em>TODO: how to annotate?</em> It's important to catch instances where these classes are members of other classes being heap or stack allocated. And it's important that in both these cases, static allocations are disallowed. | ||
* For any class which inherits from MMgc::GCFinalizedBase: | * For any class which inherits from MMgc::GCFinalizedBase: | ||
** The destructor | ** The destructor must not dereference any member pointer to a GC object | ||
** The destructor | ** The destructor must not call functions which are not annotated "safe for finalizers" <em>TODO: how to annotate?</em> | ||
* For any class inheriting from XPCOMGCObject or XPCOMGCFinalizedObject | * For any class inheriting from XPCOMGCObject or XPCOMGCFinalizedObject | ||
Line 13: | Line 13: | ||
* For any class *not* inheriting from XPCOMGCObject or XPCOMGCFinalizedObject | * For any class *not* inheriting from XPCOMGCObject or XPCOMGCFinalizedObject | ||
** the class | ** the class must not contain nsCOMPtr member variables | ||
** the class may not contain member pointers to GC objects, unless those members are annotated "safe for GC marking" <em>TODO: how to annotate?</em> | ** the class may not contain member pointers to GC objects, unless those members are annotated "safe for GC marking" <em>TODO: how to annotate?</em> |