gecko/toolkit/mozapps
Dave Townsend 52579f0139 Bug 1192921: Refactor add-on manager startup loop to better support validating install locations after scanning. r=rhelmer
The add-ons manager recognises the notion of "install locations". Each location
can contain add-ons that are installed in the application. There are two main
types, directory locations which exist as a directory somewhere in the
filesystem and registry locations which exist in the Windows registry. The
profile location is the one where add-ons installed through the UI exist, the
other locations are for add-ons that are bundled with the application,
installed by the OS or by third-party applications.

Install locations have priorities. The profile location has the highest priority
then the others gradually lower priorities. When an add-on exists in more than
one install location the version in the highest priority location is the one
that is visible and can be active in the application. We still retain details
about the other versions in the database.

On every startup the add-ons manager scans over these install locations to see
if the set of installed add-ons has changed at all. A very quick check is done
to see if the more thorough check in processFileChanges (which synchronously
loads the add-ons database and install manifests for the add-ons) is needed.

The job of processFileChanges is to load information about all the add-ons and
update the add-ons database to match. It has to decide which add-ons to make
visible, track what changes were made to the visible set of add-ons and call
restartless add-ons install and uninstall scripts.

The original version of processFileChanges attempted to optimise this by doing
all of the work in a single loop over the add-ons in the locations. This mostly
worked but made certain situations difficult to handle (see bug 607818 f.e.).
There isn't much need for this level of optimisation. We're already in a slow
pass and once all the data is loaded off the disk looping over it is fast.

This changeset moves processFileChanges into the XPIProviderUtils file which is
lazy loaded when necessary. While most of the code is the same it instead does
one loop to update the database and gather information, then a second loop to
update add-on visibility, record changes and call bootstrap scripts.
2015-08-21 16:49:56 -07:00
..
downloads Bug 1009795 - Use toLocalString to format download size instead of the decimalSymbol hook; r=mak 2015-08-27 15:32:32 -04:00
extensions Bug 1192921: Refactor add-on manager startup loop to better support validating install locations after scanning. r=rhelmer 2015-08-21 16:49:56 -07:00
handling
installer Bug 1180461 - Part 2: Package gaia into b2gdroid APK. r=glandium 2015-08-25 13:23:51 -07:00
plugins Bug 1192831 - Remove PlayPreview API. r=jet, r=peterv 2015-08-20 15:15:18 -05:00
preferences Bug 1172406 - Wrap the labels in the Master Password subdialog. r=Gijs 2015-06-18 12:26:53 -04:00
update Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium. 2015-08-27 20:44:53 -07:00