Closed Bug 1652416 Opened 4 years ago Closed 4 years ago

Remove XPCOM methods from calUtils

Categories

(Calendar :: Internal Components, task)

Tracking

(thunderbird_esr78 wontfix)

RESOLVED FIXED
81 Branch
Tracking Status
thunderbird_esr78 --- wontfix

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

Attachments

(2 files)

With a bit of rearranging the generateQI, generateClassQI, and generateCI methods of calUtils are unnecessary. I'm going to remove them to get closer to the "right" way of doing things, so that it's less likely to break in the future.

Attached patch 1652416-generateclassqi-1.diff — — Splinter Review
Attachment #9163153 - Flags: review?(philipp)

You mentioned about this being a potential memory leak, but I can't see how that would happen, unless the first instance of each class encountered was stored in a lookup table or something like that. Which would be weird.

Attachment #9163154 - Flags: review?(philipp)
Comment on attachment 9163154 [details] [diff] [review]
1652416-generateci-generateqi-1.diff

Review of attachment 9163154 [details] [diff] [review]:
-----------------------------------------------------------------

This is guidance I got many many years ago when I got started. I didn't question it, but I think it had something to do with how xpconnect/xpcom works. I think we could give this a try though, I'm hoping we'd get rid of xpcom anyway.
Attachment #9163154 - Flags: review?(philipp) → review+
Attachment #9163153 - Flags: review?(philipp) → review+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/3e574966802f
Remove cal.generateClassQI and uses of cal.generateQI where no classInfo is present. r=Fallen
https://hg.mozilla.org/comm-central/rev/187bf4f96b30
Move nsIClassInfo implementations and remove cal.generateCI and cal.generateQI. r=Fallen

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

This does cause memory leaks. A lot in some places that aren't really related to calendar, like the webextensions tests. I'm not in a good place to investigate this now, so I backed part of it out.

https://hg.mozilla.org/comm-central/rev/dbbabbfeef8efb62967f43f4a59cbcaffb475771

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

I think we can just forget about the backed out part until we deCOMtaminate calendar completely. Resetting the status to fixed because we did actually fix something.

Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: