Closed Bug 766695 Opened 13 years ago Closed 13 years ago

Warn on createInstance(Ci.*Service) and related issues

Categories

(addons.mozilla.org Graveyard :: Add-on Validation, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: kmag, Unassigned)

References

Details

(Whiteboard: [ReviewTeam])

Attempting go create a new instance of most Firefox services breaks things in ways that are not immediately obvious. We should warn whenever anyone tries to create an instance of an interface that ends with 'Service', perhaps along with a list of other specific contracts or interfaces. This issue just came up with Conduit toolbars creating new instances of the IO service.
Isn't the IO Service heavily used for fairly harmless reasons?
The IO service is heavily used. That's not the issue. The issue is calling createInstance rather than getService breaks the IO service, and related services, and causes leaks in other cases (bug 716163).
Ah, yes. Note that the Delicious bug was also fixed on the platform side, which is the most reliable way to deal with the problem. I'd recommend looking in MXR for common cases and filing Firefox bugs for them.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.