Closed Bug 602811 Opened 14 years ago Closed 14 years ago

Removing components implementing overrides of core components can lead to unexpected breakages

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: glandium, Unassigned)

Details

Here is a scenario that breaks Firefox 3.6, I don't know how many different ways of triggering this problem exists:
- Install the torbutton addon.
- Restart Firefox as requested by the addon manager
- Stop Firefox
- Remove the extensions/{e0204bd5-9d31-402b-a99d-a6aa8ffebdca}/components/external-app-blocker.js file from your profile.
- Try to start Firefox. It won't start without any error message.

A real world variant fitting the above works as the following:
- User installs Firefox on his linux distro
- User install Torbutton as packaged by his linux distro (that is, globally installed in /usr/share/mozilla/extensions/{firefox-app-id})
- User uses Firefox
- User removes the Torbutton package
- User can't start Firefox anymore.

The fundamental problem is that when several components provide the same service, only one is kept registered in the component registry, and when it disappears for some reason, everything can be left broken.

I think the component registry should keep trace of all the component ids registered for a given category and use a fall back mechanism when the first component doesn't exist.
On trunk this is already fixed. There's not a chance that we'll fix this on branch because of the refactoring/risk.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.