Closed Bug 642332 Opened 13 years ago Closed 8 years ago

COMtaminate AddonManager (XPCOM bindings)

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mark.yen, Assigned: mark.yen)

Details

Attachments

(1 file, 1 obsolete file)

I want to use AddonManager from non-JavaScript code.

Attached patch implements an XPCOM wrapper on top of AddonManager.jsm.  It passes all xpcshell unit tests (with a JS wrapper on top of the... anyway, turtles all the way down).  It also leaks like a sieve with the bottom sawed off; I suspect I need weak maps to stop leaking (since I need to keep track of mappings between various wrappers).
Attachment #519818 - Flags: review?(dtownsend)
I was wrong; by using weak refs correctly, I can do this without leaking even if no weak maps are involved.

(well, without leaking more than the non-XPCOM version, anyway.)
Attachment #519818 - Attachment is obsolete: true
Attachment #519818 - Flags: review?(dtownsend)
Attachment #520049 - Flags: review?(dtownsend)
No longer depends on: WeakMap
Comment on attachment 520049 [details] [diff] [review]
Use weak refs better, stop leaking

My apologies for not getting to this sooner, in particular not even looking too closely at what it was until now since I could have given you a much faster turnaround on this. I can appreciate why this is very useful to you guys but it isn't something that we need in the main project right now so all it will represent is added maintenance costs as we do further development on the add-ons manager.

For now I don't think we'd accept this into the main codebase so I don't know if it is worth me spending too much time doing an in-depth review on this. I am happy to give you some feedback on the patch if you like though.
Attachment #520049 - Flags: review?(dtownsend)
I think comment 2 still stands, plus the patch has bitrotted. I don't think we're likely to ever want to use AddonManager from non-JS code but we can revisit if this changes.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: