Closed
Bug 61243
Opened 24 years ago
Closed 24 years ago
[nsTraceRefcnt]move dynamic_cast out of NSCAP_* macros
Categories
(Core :: XPCOM, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla0.8
People
(Reporter: dbaron, Assigned: dbaron)
Details
Attachments
(4 files)
5.60 KB,
patch
|
Details | Diff | Splinter Review | |
11.68 KB,
patch
|
Details | Diff | Splinter Review | |
11.98 KB,
patch
|
Details | Diff | Splinter Review | |
11.99 KB,
patch
|
Details | Diff | Splinter Review |
I've never liked having the dynamic_cast in the macros for nsCOMPtr logging. When I first wrote it, I couldn't get it to work another way, but the trick seems to use nsISupports* instead of void* for the function argument, and then do the dynamic_cast within the function. I have this in my tree, but it needs to be tested...
Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.1
Assignee | ||
Comment 1•24 years ago
|
||
Assignee | ||
Comment 2•24 years ago
|
||
Assignee | ||
Comment 3•24 years ago
|
||
Assignee | ||
Comment 4•24 years ago
|
||
Comment 5•24 years ago
|
||
Looks good to me. r=waterson
Comment 6•24 years ago
|
||
Just curious why you want stub static methods for +NS_COM void +nsTraceRefcnt::Startup() +{ +#ifdef NS_BUILD_REFCNT_LOGGING + SetActivityIsLegal(PR_TRUE); +#endif +} when NS_BUILD_REFCNT_LOGGING is not defined. Isn't the whole source file excluded from compilation (or if not, shouldn't its contents be #ifdef'd out by one giant #ifdef)? School me, the answer can't stop sr=brendan@mozilla.org /be
Assignee | ||
Comment 7•24 years ago
|
||
I did it that way because everything else in the file was done that way, and I didn't want to change the whole file. I'm not sure why kipp originally wrote it that way, but I've stuck to the style. Perhaps he wanted to avoid optimized-only build bustage that would result from nsTraceRefcnt functions being called when NS_BUILD_REFCNT_LOGGING is defined. So do you think we should change it to comment out the whole file (and most of nsTraceRefcnt.h) if NS_BUILD_REFCNT_LOGGING is not defined? It might require a bit of #ifdef-ing in various places, although such things should probably not be in release builds anyway.
Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla0.9.1 → mozilla0.8
Assignee | ||
Comment 8•24 years ago
|
||
I checked in this fix way back on 2000-12-23 at 08:43 PST. The remaining leaks of nsTraceRefcnt's hashtables are covered by bug 63665 (with patch) and Brendan's comments are covered by bug 66159. Marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•