mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-11 22:41:02 +00:00
Bug 1347226 - prevent an error thrown by LightWeightThemeManager when a temporary WebExtension theme addon is installed and make sure it's enabled correctly in the Addon Manager. r=mossop
This is done by adding a check to LWTManager that ensures only valid LWTs are enabled/ disabled there. The temporary addon install flow never had to deal with addons that would be disabled by default before. Since WebExtension themes are, we need to explicitly set `userDisabled = true`. MozReview-Commit-ID: IkdNAq97cxI --HG-- extra : rebase_source : 7e78db34cbf20a8ff6e6f1574581ff15fba3a37e
This commit is contained in:
parent
e6c81765aa
commit
9e0ef2b077
@ -402,6 +402,9 @@ this.LightweightThemeManager = {
|
||||
|
||||
if (id) {
|
||||
let theme = this.getUsedTheme(id);
|
||||
// WebExtension themes have an ID, but no LWT wrapper, so bail out here.
|
||||
if (!theme)
|
||||
return;
|
||||
_themeIDBeingEnabled = id;
|
||||
let wrapper = new AddonWrapper(theme);
|
||||
if (aPendingRestart) {
|
||||
|
@ -4124,6 +4124,8 @@ this.XPIProvider = {
|
||||
addon.visible = true;
|
||||
addon.enabled = true;
|
||||
addon.active = true;
|
||||
// WebExtension themes are installed as disabled, fix that here.
|
||||
addon.userDisabled = false;
|
||||
|
||||
addon = XPIDatabase.addAddonMetadata(addon, file.persistentDescriptor);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user