Bug 1467924 - Correctly calculate add-on install location at startup. r=aswan, a=RyanVM
authorKris Maglione <maglione.k@gmail.com>
Fri, 08 Jun 2018 15:18:41 -0700
changeset 473686 7a64cce0e120a1527c1d486e74fc9f7741329f17
parent 473685 e881e8e454ebfb00e0ecf4ddf98818e7212dc318
child 473687 a108f187e35b1496183c3b146d8b689bb18c59f0
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaswan, RyanVM
bugs1467924
milestone61.0
Bug 1467924 - Correctly calculate add-on install location at startup. r=aswan, a=RyanVM MozReview-Commit-ID: 2Hl3be03ovA
toolkit/mozapps/extensions/internal/XPIProvider.jsm
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -2704,17 +2704,18 @@ var XPIProvider = {
           activeAddon.disable = true;
           for (let addon of this.getDependentAddons(aAddon)) {
             if (addon.active)
               XPIDatabase.updateAddonDisabledState(addon);
           }
         }
       }
 
-      let installLocation = aAddon._installLocation || null;
+      let installLocation = (aAddon._installLocation ||
+                             XPIProvider.installLocationsByName[aAddon.location.name]);
       let params = {
         id: aAddon.id,
         version: aAddon.version,
         installPath: aFile.clone(),
         resourceURI: getURIForResourceInFile(aFile, ""),
         signedState: aAddon.signedState,
         temporarilyInstalled: installLocation == TemporaryInstallLocation,
         builtIn: installLocation instanceof BuiltInInstallLocation,