Closed Bug 1402499 Opened 7 years ago Closed 7 years ago

Add NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED0

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: qdot, Assigned: qdot)

References

Details

Attachments

(2 files)

From bz's comment at https://bugzilla.mozilla.org/show_bug.cgi?id=1389650#c17:

"This is crying out for a NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED0 that just takes the parent class name.  Followup for that, please?

And as long as we're there, in that followup you could switch HTMLOutputElement to NS_IMPL_QUERY_INTERFACE_CYCLE_COLLECTION_INHERITED, I think."
Attachment #8913837 - Flags: review?(bzbarsky)
Ok, these patches didn't turn out quite as planned, at least, based on the initial comment that created it.

AFAICT, HTMLAnchorElement didn't really need NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0 because it derives from both nsGenericHTMLElement and Link, so we need to state both interfaces, which NS_IMPL_ISUPPORTS_CYCLE_COLLECTION already does. I went ahead and cleaned that up.

However, HTMLCanvasElement, which I'm in the process of removing, CAN use NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0, so I'm still making the patch here to use in bug 1403819

As for HTMLObjectElement, I'm not quite sure how the conversion to NS_IMPL_QUERY_INTERFACE_CYCLE_COLLECTION_INHERITED would work? It already uses NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED and seems to need it?
Comment on attachment 8913837 [details]
Bug 1402499 - Add NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0

https://reviewboard.mozilla.org/r/185220/#review190730
Attachment #8913837 - Flags: review?(bzbarsky) → review+
Comment on attachment 8913838 [details]
Bug 1402499 - Simplify HTMLAnchorElement CC macros;

https://reviewboard.mozilla.org/r/185222/#review190732
Attachment #8913838 - Flags: review?(bzbarsky) → review+
> As for HTMLObjectElement, I'm not quite sure how the conversion to NS_IMPL_QUERY_INTERFACE_CYCLE_COLLECTION_INHERITED would work?

Output, not Object.  HTML_Output_Element could use NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED, afaict.
Pushed by kmachulis@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5b8671193430
Add NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0 r=bz
https://hg.mozilla.org/integration/autoland/rev/91b6b53a5a72
Simplify HTMLAnchorElement CC macros; r=bz
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: