Closed
Bug 988699
Opened 10 years ago
Closed 10 years ago
CameraCommon.h re-#defines NS_LOG_ADDREF and NS_LOG_RELEASE for some reason
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
Attachments
(1 file)
1.91 KB,
patch
|
mikeh
:
review+
|
Details | Diff | Splinter Review |
http://mxr.mozilla.org/mozilla-central/search?string=define%20NS_LOG_ADDREF shows that we have two definitions of NS_LOG_ADDREF right now (and similar for NS_LOG_RELEASE): - one canonical definition in nsISupportsImpl.h - another random one in dom/camera/CameraCommon.h So, C++ code will have different behavior for this macro, depending on whether it happens to #include "CameraCommon.h" (directly or indirectly). That seems undesirable. These #defines were introduced in this cset for bug 779139: http://hg.mozilla.org/mozilla-central/rev/244bba751ce4#l3.137 which (per commit message and bug title) are mostly just about making camera objects participate in cycle collection, which I'd imagine shouldn't require any different special addref/release logging macros. mikeh, do you remember why we did this (and can these macros go away)?
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(mhabicher)
Comment 1•10 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #0) > > mikeh, do you remember why we did this (and can these macros go away)? At the time I had a script that would post-process the output to make nothing was leaking. I haven't used the macros since, so if they're causing problems, they can go away.
Flags: needinfo?(mhabicher)
Assignee | ||
Comment 2•10 years ago
|
||
(In reply to Mike Habicher [:mikeh] from comment #1) > I haven't used the macros since, so if they're causing > problems, they can go away. I'm not aware of them actively causing problems at the moment, other than confusion when someone searches for the definition of these macros. :) (which is how I ran across this) Anyway, it seems worth removing for that reason & from a code-hygiene perspective. Patch attached, removing these macros and their inline helper-functions nsLogAddRefCamera/nsLogReleaseCamera (since the macros are the only clients of these functions).
Comment 3•10 years ago
|
||
Comment on attachment 8398642 [details] [diff] [review] fix Review of attachment 8398642 [details] [diff] [review]: ----------------------------------------------------------------- Make it so.
Attachment #8398642 -
Flags: review?(mhabicher) → review+
Assignee | ||
Updated•10 years ago
|
Flags: in-testsuite-
Keywords: checkin-needed
Comment 5•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/72c971501525
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
(In reply to Daniel Holbert [:dholbert] from comment #2) > I'm not aware of them actively causing problems at the moment, other than > confusion when someone searches for the definition of these macros. :) > (which is how I ran across this) They'd certainly cause potential problems, in that they'd disable: * leak detection on tests run on tbpl * nsTraceRefcnt leak debugging tools for all classes implemented in files that include CameraCommon.h. Both are pretty serious.
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•