Closed Bug 579513 Opened 14 years ago Closed 14 years ago

Force updating metadata for add-ons in the application directory when the app upgrades

Categories

(Toolkit :: Add-ons Manager, defect)

x86
macOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla2.0b2

People

(Reporter: mossop, Assigned: mossop)

Details

Attachments

(1 file)

We used to do this since sometimes the installer/updater can't touch the extension directory's mtime so we just refresh all the data anyway.
This should only need to happen on app version changes and not all app upgrades.
Attached patch patch rev 1Splinter Review
Simple patch, horrible test. We can't override where the application extensions are found so this writes one to wherever the xpcshell process is running and attempts to clean up sanely afterwards.
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
Attachment #458038 - Flags: review?(robert.bugzilla)
Comment on attachment 458038 [details] [diff] [review]
patch rev 1

>diff --git a/toolkit/mozapps/extensions/XPIProvider.jsm b/toolkit/mozapps/extensions/XPIProvider.jsm
>--- a/toolkit/mozapps/extensions/XPIProvider.jsm
>+++ b/toolkit/mozapps/extensions/XPIProvider.jsm
>@@ -1650,20 +1650,22 @@ var XPIProvider = {
>         addons.forEach(function(aOldAddon) {
>           // Check if the add-on is still installed
>           if (aOldAddon.id in addonStates) {
>             let addonState = addonStates[aOldAddon.id];
>             delete addonStates[aOldAddon.id];
> 
>             // The add-on has changed if the modification time has changed, or
>             // the directory it is installed in has changed or we have an
>-            // updated manifest for it.
>+            // updated manifest for it. Also force reloading metadata for add-ons
>+            // in the application directory when the application has changed
nit: Also, reload the metadat for add-ons in the application directory when the application version has changed.
Attachment #458038 - Flags: review?(robert.bugzilla) → review+
Landed: http://hg.mozilla.org/mozilla-central/rev/f75c9b43e5af
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Flags: in-litmus-
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b2
Verified fixed based on checkin and passing test.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: