Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mozilla::RefCounted/AtomicRefCounted are deprecated in Gecko

43 views
Skip to first unread message

Kyle Huey

unread,
Apr 15, 2014, 10:24:04 PM4/15/14
to dev-platform
Please do not use mozilla::RefCounted/AtomicRefCounted in new code
that lives in Gecko. Instead continue to use the
NS_INLINE_DECL_REFCOUNTING/NS_INLINE_DECL_THREADSAFE_REFCOUNTING
macros. The MFBT versions have a number of drawbacks including
incomplete reference count logging, lack of various safety assertions,
and the requirement to make the destructor of refcounted objects
public (or add some ugly friend declarations) that the XPCOM macros do
not have, and for this reason I have decided to remove them from
Gecko.

I have removed most of the existing uses in Bug 991812. Various
things block removing the remaining ones. I plan to eventually move
these classes to mozilla::external::RefCounted/AtomicRefCounted so it
is clear that they should not be used in Gecko.

- Kyle
0 new messages