Closed Bug 1486182 Opened Last year Closed Last year

Include both category entry names and values in category entry enumerator

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: kmag, Assigned: kmag)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Nearly all of our existing category entry enumerator consumers need the entry value, either in addition to or instead of the name. Supplying both from the enumerator will simplify a lot of callers, and also allow us the delete the XPCOMUtils wrapper that most JS callers use.
Nearly all of the consumers of category enumerators require the entry value,
either along with or instead of the name. Including both by default simplifies
things considerably for most consumers, and allows us to remove the XPCOMUtils
wrapper that JS callers typically use to enumerate category entries.
This makes it much easier to update existing consumers of
XPCOMUtils.enumerateCategoryEntries to use the category manager directly.

It also, unfortunately, requires updating existing category manager consumers
to use the Services getter in order to avoid ESLint errors.
Comment on attachment 9003961 [details]
Bug 1486182: Part 1 - Include both category names and values in category enumerator. r=froydnj

Nathan Froyd [:froydnj] has approved the revision.
Attachment #9003961 - Flags: review+
Comment on attachment 9003962 [details]
Bug 1486182: Part 2a - Add Services.catMan getter for the category manager. r=aswan

Dave Townsend [:mossop] has approved the revision.
Attachment #9003962 - Flags: review+
Comment on attachment 9003963 [details]
Bug 1486182: Part 2b - Update XPCOMUtils.enumerateCategoryEntries callers to use the category manager directly. r=aswan

Dave Townsend [:mossop] has approved the revision.
Attachment #9003963 - Flags: review+
Comment on attachment 9003964 [details]
Bug 1486182: Part 3 - Remove unused XPCOMUtils.enumerateCategoryEntries method. r=mccr8

Dave Townsend [:mossop] has approved the revision.
Attachment #9003964 - Flags: review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/8340805509c5503ff44c5d47d7333aa206960a58
Bug 1486182: Part 1 - Include both category names and values in category enumerator. r=froydnj

https://hg.mozilla.org/integration/mozilla-inbound/rev/a6435d51a3463a46e4a86813bb9f2816d33973f3
Bug 1486182: Part 2a - Add Services.catMan getter for the category manager. r=mossop

https://hg.mozilla.org/integration/mozilla-inbound/rev/98c713bc89b77a04b0c23c72f7df2b57b0b613a6
Bug 1486182: Part 2b - Update XPCOMUtils.enumerateCategoryEntries callers to use the category manager directly. r=mossop

https://hg.mozilla.org/integration/mozilla-inbound/rev/35df1b482f0d34f516a8920146fee6df42691596
Bug 1486182: Part 3 - Remove unused XPCOMUtils.enumerateCategoryEntries method. r=mossop
https://hg.mozilla.org/integration/mozilla-inbound/rev/0eb3d4f4ee5b7d25e5286419d17558ec2756ab67
Bug 1486182: Follow-up: Fix straggler nsIUTF8StringEnumerator references. r=bustage CLOSED TREE
You need to log in before you can comment on or make changes to this bug.