Closed
Bug 386536
Opened 17 years ago
Closed 17 years ago
Add category manager helpers to XPCOMUtils
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha8
People
(Reporter: asqueella, Assigned: asqueella)
References
Details
Attachments
(1 file, 1 obsolete file)
10.87 KB,
patch
|
jst
:
approval1.9+
|
Details | Diff | 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 | ||
Updated•17 years ago
|
Assignee: nobody → asqueella
Comment 1•17 years ago
|
||
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 2•17 years ago
|
||
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+
Comment 3•17 years ago
|
||
Attachment #270529 -
Attachment is obsolete: true
Attachment #276237 -
Flags: approval1.9?
Assignee | ||
Comment 4•17 years ago
|
||
Ryan, thanks for creating an updated patch!
Updated•17 years ago
|
Attachment #276237 -
Flags: approval1.9? → approval1.9+
Comment 5•17 years ago
|
||
mozilla/browser/fuel/src/fuelApplication.js 1.18 mozilla/js/src/xpconnect/loader/XPCOMUtils.jsm 1.7
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M8
You need to log in
before you can comment on or make changes to this bug.
Description
•