Closed Bug 386536 Opened 18 years ago Closed 18 years ago

Add category manager helpers to XPCOMUtils

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha8

People

(Reporter: asqueella, Assigned: asqueella)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
It's common for an XPCOM component to get registered for various categories via the category manager. Currently you have to write a register hook which gets the category manager and uses it to register the component. This patch lets the author add a simple declaration to the component's prototype, like this: _xpcom_categories: [{category: "some-category"}] - and the XPCOMUtils' module takes care of registering the component for the specified categories. As an example, I converted fuel to use the helpers. The patch is not quite tested, but passes the fuel auto-tests.
Attachment #270529 - Flags: review?(sayrer)
Assignee: nobody → asqueella
Comment on attachment 270529 [details] [diff] [review] patch r=sayrer for the xpcom changes, let's see what mfinkle thinks about the FUEL stuff. sorry for the delay.
Attachment #270529 - Flags: review?(sayrer)
Attachment #270529 - Flags: review?(mark.finkle)
Attachment #270529 - Flags: review+
Comment on attachment 270529 [details] [diff] [review] patch ## This patch has bitrotted a bit ## >Index: browser/fuel/src/fuelApplication.js >+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); >+ This is already done >+ // add Application as a global property for easy access >+ { category: "JavaScript global property" } >+ ], We now use the new "JavaScript global privileged property" > // for nsISupports > QueryInterface: function app_qi(aIID) { >- // add any other interfaces you support here Obsolete change Very nice addition to XPCOMUtils! r=me with bitrot fixes
Attachment #270529 - Flags: review?(mark.finkle) → review+
Attached patch unbitrottedSplinter Review
Attachment #270529 - Attachment is obsolete: true
Attachment #276237 - Flags: approval1.9?
Ryan, thanks for creating an updated patch!
Attachment #276237 - Flags: approval1.9? → approval1.9+
mozilla/browser/fuel/src/fuelApplication.js 1.18 mozilla/js/src/xpconnect/loader/XPCOMUtils.jsm 1.7
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M8
Depends on: 434676
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: