All users were logged out of Bugzilla on October 13th, 2018

forbid MOZ_COUNT_{CTOR,DTOR} for nsISupports classes

RESOLVED FIXED in Firefox 53

Status

()

RESOLVED FIXED
2 years ago
17 days ago

People

(Reporter: froydnj, Assigned: froydnj)

Tracking

(Blocks: 1 bug)

unspecified
mozilla53
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox53 fixed)

Details

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Comment 1

2 years ago
Created attachment 8818075 [details] [diff] [review]
forbid MOZ_COUNT_{CTOR,DTOR} for nsISupports classes

r+'ing Andrew's patch from bug 1307961, minus the nsTraceRefcnt bits.
Attachment #8818075 - Flags: review+
(Assignee)

Updated

2 years ago
Blocks: 1307961

Comment 2

2 years ago
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f347515b29ae
forbid MOZ_COUNT_{CTOR,DTOR} for nsISupports classes; r=froydnj

Comment 3

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/f347515b29ae
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox53: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53

Updated

2 years ago
Depends on: 1323406

Comment 4

18 days ago
I'm having trouble to understand this. Sure, if the backend used the same stuff as refcnt logging, that could be annoying, but don't we want to be able to have the macros to ensure stuff gets deleted - especially in cases where refcnt handling is unusual.
Am I missing something?

Updated

18 days ago
Flags: needinfo?(continuation)
(In reply to Olli Pettay [:smaug] (r- if the bug doesn't explain what the change(s) are about.) from comment #4)
> Am I missing something?

The idea here was that people were adding these MOZ_COUNT_CTORs when they didn't need to, because they didn't realize that refcounted classes already did it for them. It is just nicer to not have the noisiness of this code that isn't needed, and it also adds a little more spamminess to the leaks when they do happen. If there's a particular case where you really want both (and I do understand why you might want it sometimes), we could add a variant of the CTOR/DTOR macro that doesn't have the check.
Flags: needinfo?(continuation)
You need to log in before you can comment on or make changes to this bug.