Closed
Bug 977380
Opened 11 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)
Core
XPCOM
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 | ||
Updated•11 years ago
|
Assignee: nobody → continuation
Comment 1•11 years ago
|
||
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.
Assignee | ||
Comment 3•8 years ago
|
||
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.
Description
•