Closed Bug 907481 Opened 7 years ago Closed 7 years ago
Check if local
Id is already used before using it
To get a new localId, we're using a preference. This doesn't work well with the multiple profile model we have for desktop apps.
Attachment #793203 - Flags: review?(fabrice)
Can you give steps to reproduce the issue you're having? I can't tell if this is in the app profile or in the firefox profile, and what are the prefs in any of them.
The Firefox profile and the webapps profiles are separated. e.g. in Firefox, the preference could be 1000, in one of the installed webapps it could be 1. If you install an app through Firefox, _nextLocalId returns 1001. If you install an app through another app, _nextLocal returns 2. This localId=2 could be already used by another application. So, we can't rely on a preference because it isn't guaranteed to be in a sane state.
That doesn't explain why you want to avoid collisions between the firefox profile and the app profile. I don't think you should try to synchronize the localIds among profiles. They are an implementation detail due to how we identify apps in principals and data jars. What really matters is only the manifest url.
(In reply to Fabrice Desré [:fabrice] from comment #3) > That doesn't explain why you want to avoid collisions between the firefox > profile and the app profile. The apps installed through another app are still installed in the Firefox profile. So without this patch we'd end up with several apps installed with the same localId in the same profile.
We should disable apps installation from the webapp runtime if we can't fix this.
Attachment #793203 - Flags: review?(fabrice) → review+
Updated commit message.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
You need to log in before you can comment on or make changes to this bug.