Open
Bug 1008348
Opened 12 years ago
Updated 3 years ago
Make mRefCnt private instead of protected
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
NEW
People
(Reporter: mccr8, Unassigned)
References
Details
I don't see any good reason why a child class should be accessing mRefCnt directly in most cases. Doing this will let us catch when somebody does NS_IMPL_ISUPPORTS() when they should be using NS_IMPL_ISUPPORTS_INHERITED(). It seems to mostly work, aside from a bunch of places that want to print out the refcount. It does produce a monstrous amount of error spew when you get it wrong, though.
Comment 1•12 years ago
|
||
In some cases we want to check whether object is purple. But I guess the base class can then just
expose some helper methods.
| Reporter | ||
Comment 2•12 years ago
|
||
That wasn't actually a problem.
| Reporter | ||
Comment 3•11 years ago
|
||
This is another thing you might be interested in looking into, bjacob. I have a WIP around somewhere. There are some classes that access the refcount directly, some to reimplement AddRef()/Release(), some to just print out the ref count. So you'd probably need some kind of escape hatch.
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•