Closed Bug 977380 Opened 10 years ago Closed 8 years ago

MOZ_COUNT_CTOR/MOZ_COUNT_DTOR should complain if they are used from ISupports things

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1307961

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

They are only needed for non-refcounted-things.  Compile time failure would be better, of course.
Assignee: nobody → continuation
What you really want to check for here is whether the object has an AddRef and Release method.  I think the best way to fix this is to add an implementation of http://en.cppreference.com/w/cpp/types/is_member_function_pointer to mfbt/TypeTraits.h, and then static_assert your way to victory.
Bug 1307961 is a generalization of this.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.