Closed Bug 1484466 Opened 6 years ago Closed 6 years ago

Remove unused/unnecessary XPCOMUtils methods

Categories

(Core :: XPConnect, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: kmag, Assigned: kmag)

References

(Blocks 1 open bug)

Details

Attachments

(7 files)

We have a bunch of code in XPCOMUtils that's obsolete and/or unused. Loading that code in every content process isn't super cheap, so we should try to pare away the stuff we don't need.
These stopped having any effect when we switched to ChromeUtils.generateQI,
which does not support automatic nsIClassInfo forwarding.
PConnect will handle dispatching an appropriate error for these calls.
Comment on attachment 9002234 [details]
Bug 1484466: Part 1 - Remove unused XPCOMUtils.importRelative method. r=mccr8

Andrew McCreight [:mccr8] has approved the revision.
Attachment #9002234 - Flags: review+
Comment on attachment 9002235 [details]
Bug 1484466: Part 2a - Remove no-op generateCI calls. r=mccr8

Andrew McCreight [:mccr8] has approved the revision.
Attachment #9002235 - Flags: review+
Comment on attachment 9002236 [details]
Bug 1484466: Part 2b - Remove unused XPCOMUtils.generateCI method. r=mccr8

Andrew McCreight [:mccr8] has approved the revision.
Attachment #9002236 - Flags: review+
Comment on attachment 9002237 [details]
Bug 1484466: Part 3a - Update remaining XPCOMUtils.generateQI callers to use ChromeUtils. r=mccr8

Andrew McCreight [:mccr8] has approved the revision.
Attachment #9002237 - Flags: review+
Comment on attachment 9002238 [details]
Bug 1484466: Part 3b - Remove unused XPCOMUtils.generateQI method. r=mccr8

Andrew McCreight [:mccr8] has approved the revision.
Attachment #9002238 - Flags: review+
Comment on attachment 9002239 [details]
Bug 1484466: Part 4 - Remove unnecessary lockFactory stub method implementation. r=mccr8

Andrew McCreight [:mccr8] has approved the revision.
Attachment #9002239 - Flags: review+
Comment on attachment 9002240 [details]
Bug 1484466: Part 5 - Use a single QueryInterface method for all nsIFactory instances. r=mccr8

Andrew McCreight [:mccr8] has approved the revision.
Attachment #9002240 - Flags: review+
(In reply to Andrew McCreight [:mccr8] from comment #12)
> Comment on attachment 9002238 [details]
> Bug 1484466: Part 3b - Remove unused XPCOMUtils.generateQI method. r=mccr8
> 
> Andrew McCreight [:mccr8] has approved the revision.
>
> This is still used in a bunch of places in Thunderbird, so please file a
> bug against them telling them to remove their uses of it. I guess at this
> point it is just a wrapper so the fix should be easy.
Flags: needinfo?(jorgk)
Depends on: 1484867
These ones?
https://searchfox.org/comm-central/search?q=XPCOMUtils.generateQI&case=false&regexp=false&path=

calendar/providers/gdata/modules/calUtilsShim.jsm
editor/ui/nsComposerCmdLineHandler.js
ldap/xpcom/src/nsLDAPProtocolHandler.js
mailnews/addrbook/src/nsAbLDAPAttributeMap.js
and a heap of suite/, that is, SeaMonkey stuff?

Thanks for the heads-up. I filed bug 1484867.

Calendar/gData is special, editor is most likely of the composer part of SeaMonkey, so only ldap/mailnews is left.
Flags: needinfo?(jorgk)
(In reply to Jorg K (GMT+2) from comment #16)
> These ones?
> https://searchfox.org/comm-central/search?q=XPCOMUtils.
> generateQI&case=false&regexp=false&path=

Yup.

> and a heap of suite/, that is, SeaMonkey stuff?

Oh, yeah, I guess the bug that originally moved things to ChromeUtils.generateQI intentionally skipped SeaMonkey.

> Calendar/gData is special

It still needs to be fixed. Presumably the shim should just switch to ChromeUtils.generateQI.bind(ChromeUtils).
https://hg.mozilla.org/integration/mozilla-inbound/rev/73df3e4f72aa90282e82b4672ea662e74f4698a1
Bug 1484466: Part 1 - Remove unused XPCOMUtils.importRelative method. r=mccr8

https://hg.mozilla.org/integration/mozilla-inbound/rev/870f2a75850c4646bb9f026a8c7ecb1c3bc37568
Bug 1484466: Part 2a - Remove no-op generateCI calls. r=mccr8

https://hg.mozilla.org/integration/mozilla-inbound/rev/432da59e0c1b73548aa10cc0acaf8c6af04503b7
Bug 1484466: Part 2b - Remove unused XPCOMUtils.generateCI method. r=mccr8

https://hg.mozilla.org/integration/mozilla-inbound/rev/db23f8b137c534451c0aee11f1ee6538d551b4ce
Bug 1484466: Part 3a - Update remaining XPCOMUtils.generateQI callers to use ChromeUtils. r=mccr8

https://hg.mozilla.org/integration/mozilla-inbound/rev/2498075cf65ac9a17760e7059d69ef4c13769b51
Bug 1484466: Part 3b - Remove unused XPCOMUtils.generateQI method. r=mccr8

https://hg.mozilla.org/integration/mozilla-inbound/rev/bc1aeabcfba359878ccd84e60047cc7cc1539a6e
Bug 1484466: Part 4 - Remove unnecessary lockFactory stub method implementation. r=mccr8

https://hg.mozilla.org/integration/mozilla-inbound/rev/5a5a1fc7d18c90ad9432bf88a4f047669a065cfd
Bug 1484466: Part 5 - Use a single QueryInterface method for all nsIFactory instances. r=mccr8
Depends on: 1484957
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: