Bug 1364878: Fix add-on path migration issues. r?aswan
MozReview-Commit-ID: JuPz1MoZlcj
--- a/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
+++ b/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
@@ -497,16 +497,19 @@ this.XPIDatabase = {
// force the DB to save so that the DB_SCHEMA value in the JSON file and
// the preference are updated.
}
// If we got here, we probably have good data
// Make AddonInternal instances from the loaded data and save them
let addonDB = new Map();
for (let loadedAddon of inputAddons.addons) {
try {
+ if (!loadedAddon.path) {
+ loadedAddon.path = descriptorToPath(loadedAddon.descriptor);
+ }
loadedAddon._sourceBundle = new nsIFile(loadedAddon.path);
} catch (e) {
// We can fail here when the path is invalid, usually from the
// wrong OS
logger.warn("Could not find source bundle for add-on " + loadedAddon.id, e);
}
let newAddon = new DBAddonInternal(loadedAddon);